1700
How do I layout expandable columns

local var_Column,var_Column1,var_Column2 as IColumn
local var_Columns as IColumns

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:DrawGridLines := exAllLines
oDCOCX_Exontrol1:BackColorLevelHeader := oDCOCX_Exontrol1:BackColor
var_Columns := oDCOCX_Exontrol1:Columns
	var_Column := IColumn{var_Columns:Add("C0")}
		var_Column:ExpandColumns := "1,2"
		var_Column:DisplayExpandButton := true
	var_Columns:Add("C1")
	var_Columns:Add("C2")
	var_Columns:Add("C3")
	var_Column1 := IColumn{var_Columns:Add("C4")}
		var_Column1:ExpandColumns := "5,6"
		var_Column1:DisplayExpandButton := true
	var_Columns:Add("C5")
	var_Column2 := IColumn{var_Columns:Add("C6")}
		var_Column2:ExpandColumns := "6,7"
		var_Column2:DisplayExpandButton := true
	var_Columns:Add("C7")
oDCOCX_Exontrol1:EndUpdate()
oDCOCX_Exontrol1:Columns:[Item,"C4"]:Expanded := false

1699
Is it possible to display automatically the start/end margins of the bars

local var_Bar as IBar
local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:[PaneWidth,false] := 64
	var_Bar := var_Chart:Bars:[Item,"Task"]
		var_Bar:[Def,exBarCaption] := "<%=%1%>"
		var_Bar:[Def,exBarHAlignCaption] := 16
		var_Bar:[Def,exBarExtraCaption] := "<%=%2%>"
		var_Bar:[Def,exBarExtraCaptionHAlign] := 18
	var_Chart:ScrollTo(var_Chart:FirstVisibleDate,1)
oDCOCX_Exontrol1:Columns:Add("Task")
IColumn{oDCOCX_Exontrol1:Columns:Add("ToolTip")}:Visible := false
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Item 1")
	var_Items:[CellValue,h,1] := "bar <b>a"
	var_Items:AddBar(h,"Task",SToD("20001229"),SToD("20010105"),nil,nil)
	h := var_Items:AddItem("Item 2")
	var_Items:[CellValue,h,1] := "bar <b>b"
	var_Items:AddBar(h,"Task",SToD("20001230"),SToD("20010106"),nil,nil)
oDCOCX_Exontrol1:EndUpdate()

1698
Is it possible to assign the bar's caption from a hidden column

local var_Bar as IBar
local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:[PaneWidth,false] := 64
	var_Bar := var_Chart:Bars:[Item,"Task"]
		var_Bar:[Def,exBarCaption] := "<%=%C1%>"
		var_Bar:[Def,exBarHAlignCaption] := 18
oDCOCX_Exontrol1:Columns:Add("Task")
IColumn{oDCOCX_Exontrol1:Columns:Add("ToolTip")}:Visible := false
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Item 1")
	var_Items:[CellValue,h,1] := "bar <b>a"
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010105"),nil,nil)
	h := var_Items:AddItem("Item 2")
	var_Items:[CellValue,h,1] := "bar <b>b"
	var_Items:AddBar(h,"Task",SToD("20010103"),SToD("20010106"),nil,nil)
oDCOCX_Exontrol1:EndUpdate()

1697
Is it possible to assign the bar's tooltip from a hidden column

local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:[PaneWidth,false] := 64
	var_Chart:Bars:[Item,"Task"]:[Def,exBarToolTip] := "<%=%C1%>"
oDCOCX_Exontrol1:Columns:Add("Task")
IColumn{oDCOCX_Exontrol1:Columns:Add("ToolTip")}:Visible := false
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Item 1")
	var_Items:[CellValue,h,1] := "This is a bit of text that's shown when the cursor hovers the bar on item 1."
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010105"),nil,nil)
	h := var_Items:AddItem("Item 2")
	var_Items:[CellValue,h,1] := "This is a bit of text that's shown when the cursor hovers the bar on item 2."
	var_Items:AddBar(h,"Task",SToD("20010103"),SToD("20010106"),nil,nil)
oDCOCX_Exontrol1:EndUpdate()

1696
I am using exBarFrameColor, but no black frame is shown. What could be wrong (method 2)

local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:[PaneWidth,false] := 128
oDCOCX_Exontrol1:Columns:Add("Task")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Default")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010105"),nil,nil)
	var_Items:[ItemBar,h,"",exBarFrameColor] := 65536
oDCOCX_Exontrol1:EndUpdate()

1695
I am using exBarFrameColor, but no black frame is shown. What could be wrong (method 1)

local var_Chart as IChart
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:[PaneWidth,false] := 128
	var_Chart:Bars:[Item,"Task"]:[Def,exBarFrameColor] := 65536
oDCOCX_Exontrol1:Columns:Add("Task")
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddBar(var_Items:AddItem("Default"),"Task",SToD("20010102"),SToD("20010105"),nil,nil)
oDCOCX_Exontrol1:EndUpdate()

1694
What I need is bars that have a solid color, but with a black frame. How can we do that

local var_Bar as IBar
local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DefaultItemHeight := 22
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:LevelCount := 2
	var_Chart:[PaneWidth,false] := 0
var_Bar := oDCOCX_Exontrol1:Chart:Bars:Add("Frame")
	var_Bar:Pattern := exPatternSolid
	var_Bar:Color := RGB(0,255,0)
	var_Bar:[Def,exBarFrameColor] := 65536
	var_Bar:[Def,exBarCaption] := "<font ;6><%=%C0%>"
	var_Bar:[Def,exBarHAlignCaption] := 18
	var_Bar:Height := 15
oDCOCX_Exontrol1:Columns:Add("Frames")
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddBar(var_Items:AddItem("Default"),"Frame",SToD("20010102"),SToD("20010107"),nil,nil)
	h := var_Items:AddItem("Inside Color")
	var_Items:AddBar(h,"Frame",SToD("20010102"),SToD("20010107"),nil,nil)
	var_Items:[ItemBar,h,"",exBarColor] := 255
	h := var_Items:AddItem("Border Color")
	var_Items:AddBar(h,"Frame",SToD("20010102"),SToD("20010107"),nil,nil)
	var_Items:[ItemBar,h,"",exBarFrameColor] := 33023
	h := var_Items:AddItem("Inside/Border Color")
	var_Items:AddBar(h,"Frame",SToD("20010102"),SToD("20010107"),nil,nil)
	var_Items:[ItemBar,h,"",exBarColor] := 16711680
	var_Items:[ItemBar,h,"",exBarFrameColor] := 33023
	h := var_Items:AddItem("Thick-Border")
	var_Items:AddBar(h,"Frame",SToD("20010102"),SToD("20010107"),nil,nil)
	var_Items:[ItemBar,h,"",exBarPattern] := 4097
	h := var_Items:AddItem("Thick-Border + Pattern")
	var_Items:AddBar(h,"Frame",SToD("20010102"),SToD("20010107"),nil,nil)
	var_Items:[ItemBar,h,"",exBarPattern] := 4098
oDCOCX_Exontrol1:EndUpdate()

1693
How can we drag bars from one item to the other

local var_Bar as IBar
local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DefaultItemHeight := 22
oDCOCX_Exontrol1:DrawGridLines := exAllLines
IColumn{oDCOCX_Exontrol1:Columns:Add("Members")}:[Def,exCellValueFormat] := 1
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20060920")
	var_Chart:AllowLinkBars := false
	var_Chart:AllowCreateBar := exNoCreateBar
	var_Chart:AllowSelectObjects := exNoSelectObjects
	var_Chart:LevelCount := 2
	var_Chart:[PaneWidth,false] := 96
	var_Chart:DrawGridLines := exAllLines
	var_Bar := var_Chart:Bars:[Item,"Task"]
		var_Bar:OverlaidType := exOverlaidBarsIncludeCaption | exOverlaidBarsStackAutoArrange | exOverlaidBarsStack
		var_Bar:Height := 18
		var_Bar:Pattern := exPatternSolid
		var_Bar:Color := RGB(0,128,255)
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Member <b>1</b>")
	var_Items:AddBar(h,"Task",SToD("20060921"),SToD("20060923"),"T102","<font ;6><fgcolor FFFFFF>Task <b>102</b>")
	var_Items:[ItemBar,h,"T102",exBarCanMoveToAnother] := true
	h := var_Items:AddItem("Member <b>2</b>")
	h := var_Items:AddItem("Member <b>3</b>")
	h := var_Items:AddItem("Member <b>4</b>")
	var_Items:AddBar(h,"Task",SToD("20060921"),SToD("20060923"),"T103","<font ;6><fgcolor FFFFFF>Task <b>103</b>")
	var_Items:[ItemBar,h,"T103",exBarCanMoveToAnother] := true
oDCOCX_Exontrol1:EndUpdate()

1692
How can I use the exBarBackgroundExt option of the Items.ItemBar property

local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DefaultItemHeight := 26
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:NonworkingDays := 0
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:[PaneWidth,false] := 128
	var_Chart:Bars:[Item,"Task"]:Height := 22
oDCOCX_Exontrol1:Columns:Add("Column")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Border-Top")
	var_Items:AddBar(h,"Task",SToD("20010103"),SToD("20010107"),nil,nil)
	var_Items:[ItemBar,h,"",exBarBackgroundExt] := "top[3,back=RGB(0,0,0)]"
	h := var_Items:AddItem("Border-Bottom")
	var_Items:AddBar(h,"Task",SToD("20010103"),SToD("20010107"),nil,nil)
	var_Items:[ItemBar,h,"",exBarBackgroundExt] := "bottom[3,back=RGB(255,0,0)]"
	h := var_Items:AddItem("Border-Left")
	var_Items:AddBar(h,"Task",SToD("20010103"),SToD("20010107"),nil,nil)
	var_Items:[ItemBar,h,"",exBarBackgroundExt] := "left[6,back=RGB(0,255,0)]"
	h := var_Items:AddItem("Border-Right")
	var_Items:AddBar(h,"Task",SToD("20010103"),SToD("20010107"),nil,nil)
	var_Items:[ItemBar,h,"",exBarBackgroundExt] := "right[6,back=RGB(0,0,255)]"
	h := var_Items:AddItem("Border-All")
	var_Items:AddBar(h,"Task",SToD("20010103"),SToD("20010107"),nil,nil)
	var_Items:[ItemBar,h,"",exBarBackgroundExt] := "top[3,back=RGB(0,0,0)],right[3,back=RGB(0,0,255)],bottom[3,back=RGB(255,0,0)],left[3,back=RGB(0,255,0)],client"
	h := var_Items:AddItem("Middle")
	var_Items:AddBar(h,"Task",SToD("20010103"),SToD("20010107"),nil,nil)
	var_Items:[ItemBar,h,"",exBarBackgroundExt] := "none[(25%,25%,50%,50%),back=RGB(255,0,0)]"
	h := var_Items:AddItem("Horizontal")
	var_Items:AddBar(h,"Task",SToD("20010103"),SToD("20010107"),nil,nil)
	var_Items:[ItemBar,h,"",exBarBackgroundExt] := "none[(0,50%-2,100%,4),back=RGB(255,0,0)]"
	h := var_Items:AddItem("Vertical")
	var_Items:AddBar(h,"Task",SToD("20010103"),SToD("20010107"),nil,nil)
	var_Items:[ItemBar,h,"",exBarBackgroundExt] := "none[(50%-2,0,4,100%),back=RGB(255,0,0)]"
	h := var_Items:AddItem("Mixt")
	var_Items:AddBar(h,"Task",SToD("20010103"),SToD("20010107"),nil,nil)
	var_Items:[ItemBar,h,"",exBarBackgroundExt] := "[[patterncolor=RGB(255,0,0)](none[(4,4,100%-8,100%-8),pattern=0x006,patterncolor=RGB(255,0,0),frame=RGB(255,0,0),framethick])]"
	h := var_Items:AddItem("Misc")
	var_Items:AddBar(h,"Task",SToD("20010103"),SToD("20010107"),nil,nil)
	var_Items:[ItemBar,h,"",exBarBackgroundExt] := "bottom[50%,pattern=10,frame]"
	h := var_Items:AddItem("Complex")
	var_Items:AddBar(h,"Task",SToD("20010103"),SToD("20010107"),nil,nil)
	var_Items:[ItemBar,h,"",exBarBackgroundExt] := "left[10%](top[90%,back=RGB(0,0,0)]),top[30%,back=RGB(254,217,102)],client[back=RGB(91,156,212)]"
oDCOCX_Exontrol1:EndUpdate()

1691
Does the title of the cell's tooltip supports HTML format

local var_Column as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Chart:[PaneWidth,true] := 0
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("")}
	var_Column:Caption := ""
	var_Column:HTMLCaption := "Column"
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellToolTip,var_Items:AddItem("tooltip w/h different title"),0] := "<c><b><fgcolor=FF0000>Title</fgcolor></b><br>This is bit of text that's shown when the user hovers the cell. This shows the title centered with a different color."
oDCOCX_Exontrol1:EndUpdate()

1690
How do I specify a different title for the cell's tooltip

local var_Column as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Chart:[PaneWidth,true] := 0
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("")}
	var_Column:Caption := "This is the title"
	var_Column:HTMLCaption := "Column"
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellToolTip,var_Items:AddItem("tooltip w/h different title"),0] := "This is bit of text that's shown when the user hovers the cell."
oDCOCX_Exontrol1:EndUpdate()

1689
The cell's tooltip displays the column's caption in its title. How can I get ride of that

local var_Column as IColumn
local var_Columns as IColumns
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Chart:[PaneWidth,true] := 0
var_Columns := oDCOCX_Exontrol1:Columns
	var_Columns:Add("C1")
	var_Columns:Add("C2")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("tooltip w/h caption")
	var_Items:[CellToolTip,h,0] := "This is bit of text that's shown when the user hovers the cell. This shows the column's caption in the title."
	var_Items:[CellValue,h,1] := "tooltip no caption"
	var_Items:[CellToolTip,h,1] := "This is bit of text that's shown when the user hovers the cell. This shows no column's caption in the title."
var_Column := oDCOCX_Exontrol1:Columns:[Item,"C2"]
	var_Column:HTMLCaption := var_Column:Caption
	var_Column:Caption := ""
oDCOCX_Exontrol1:EndUpdate()

1688
How can I programmatically show the column's filter

METHOD OCX_Exontrol1RClick() CLASS MainDialog
	// RClick event - Fired when right mouse button is clicked
	// Columns(c).ShowFilter("-1,-1,128,128")
	local i as USUAL
	i := oDCOCX_Exontrol1:[ItemFromPoint,-1,-1,c,hit]
RETURN NIL

local var_Column as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ShowFocusRect := false
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Items ")}
	var_Column:DisplayFilterPattern := false
	var_Column:FilterList := exShowExclude | exShowFocusItem | exShowCheckBox
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("Item 1")
	var_Items:AddItem("Item 2")
	var_Items:AddItem("Item 3")
oDCOCX_Exontrol1:EndUpdate()

1687
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 2)

METHOD OCX_Exontrol1ColumnClick(Column) CLASS MainDialog
	// ColumnClick event - Fired after the user clicks on column's header.
	// Column.SortOrder = 1
	oDCOCX_Exontrol1:SortOnClick := exDefaultSort
	oDCOCX_Exontrol1:Columns:[Item,"Sort"]:SortOrder := SortAscending
	oDCOCX_Exontrol1:SortOnClick := exUserSort
RETURN NIL

local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SortOnClick := exUserSort
oDCOCX_Exontrol1:Columns:Add("Items")
IColumn{oDCOCX_Exontrol1:Columns:Add("Sort")}:Visible := false
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellValue,var_Items:AddItem("Item 1 (3)"),1] := 3
	var_Items:[CellValue,var_Items:AddItem("Item 2 (1)"),1] := 1
	var_Items:[CellValue,var_Items:AddItem("Item 3 (2)"),1] := 2
oDCOCX_Exontrol1:EndUpdate()

1686
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 1)

METHOD OCX_Exontrol1ColumnClick(Column) CLASS MainDialog
	// ColumnClick event - Fired after the user clicks on column's header.
	// Column.SortOrder = 1
	oDCOCX_Exontrol1:Items:SortChildren(0,"Sort",true)
RETURN NIL

local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SortOnClick := exUserSort
oDCOCX_Exontrol1:Columns:Add("Items")
IColumn{oDCOCX_Exontrol1:Columns:Add("Sort")}:Visible := false
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellValue,var_Items:AddItem("Item 1 (3)"),1] := 3
	var_Items:[CellValue,var_Items:AddItem("Item 2 (1)"),1] := 1
	var_Items:[CellValue,var_Items:AddItem("Item 3 (2)"),1] := 2
oDCOCX_Exontrol1:EndUpdate()

1685
How do I get information about control's events
METHOD OCX_Exontrol1Event(EventID) CLASS MainDialog
	// Event event - Notifies the application once the control fires an event.
	OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:ExecuteTemplate("EventParam(-2)")) ))
RETURN NIL

local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:[PaneWidth,false] := 48
	var_Chart:AllowLinkBars := false
	var_Chart:Bars:[Item,"Task"]:OverlaidType := exOverlaidBarsTransparent | exOverlaidBarsOffset
oDCOCX_Exontrol1:Columns:Add("Column")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Item 1")
	var_Items:[EnableItem,h] := false
	var_Items:[ItemData,h] := -1
	h := var_Items:AddItem("Item 2")
	var_Items:[ItemData,h] := 0
	var_Items:AddBar(h,"Task",SToD("20010105"),SToD("20010107"),"B",nil)
	var_Items:[ItemBar,h,"B",exBarCanMoveToAnother] := true
	var_Items:[ItemData,var_Items:AddItem("Item 3")] := 0
	h := var_Items:AddItem("Item 4")
	var_Items:[EnableItem,h] := false
	var_Items:[ItemData,h] := -1
oDCOCX_Exontrol1:EndUpdate()

1684
How can I sort by two-columns, one by date and one by time

local var_Column as IColumn
local var_Columns as IColumns
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SingleSort := false
var_Columns := oDCOCX_Exontrol1:Columns
	IColumn{var_Columns:Add("Index")}:FormatColumn := "1 index ``"
	IColumn{var_Columns:Add("Date")}:SortType := SortDate
	var_Column := IColumn{var_Columns:Add("Time")}
		var_Column:SortType := SortTime
		var_Column:FormatColumn := "time(value)"
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem(0)
	var_Items:[CellValue,h,1] := SToD("20010101")
	var_Items:[CellValue,h,2] := SToD("20010101 10:00:00")
	h := var_Items:AddItem(0)
	var_Items:[CellValue,h,1] := SToD("20001231")
	var_Items:[CellValue,h,2] := SToD("20010101 10:00:00")
	h := var_Items:AddItem(0)
	var_Items:[CellValue,h,1] := SToD("20010101")
	var_Items:[CellValue,h,2] := SToD("20010101 06:00:00")
	h := var_Items:AddItem(0)
	var_Items:[CellValue,h,1] := SToD("20001231")
	var_Items:[CellValue,h,2] := SToD("20010101 08:00:00")
	h := var_Items:AddItem(0)
	var_Items:[CellValue,h,1] := SToD("20010101")
	var_Items:[CellValue,h,2] := SToD("20010101 08:00:00")
	h := var_Items:AddItem(0)
	var_Items:[CellValue,h,1] := SToD("20001231")
	var_Items:[CellValue,h,2] := SToD("20010101 06:00:00")
oDCOCX_Exontrol1:Layout := "multiplesort=" + CHR(34) + "C1:1 C2:1" + CHR(34) + ""
oDCOCX_Exontrol1:EndUpdate()

1683
I am trying to hide the non-working dates by using the AddNonworkingDate to specify custom non-working dates while NonworkingDays property is 0, but the non-working date is still shown. What can be wrong

local var_Chart as IChart

oDCOCX_Exontrol1:BeginUpdate()
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20080101")
	var_Chart:[PaneWidth,false] := 0
	var_Chart:LevelCount := 2
	var_Chart:ShowNonworkingUnits := false
	var_Chart:ShowNonworkingDates := false
	var_Chart:NonworkingDays := 128
	var_Chart:AddNonworkingDate(SToD("20080107"))
	var_Chart:AddNonworkingDate(SToD("20080108"))
	var_Chart:AddNonworkingDate(SToD("20080109"))
	var_Chart:AddNonworkingDate(SToD("20080110"))
oDCOCX_Exontrol1:EndUpdate()

1682
How can I display the task's duration, in days, hours and minutes

local var_Chart as IChart
local var_Column,var_Column1 as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Tasks")}
	var_Column:AllowSizing := false
	var_Column:Width := 36
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("Duration")}
	var_Column1:[Def,exCellValueToItemBarProperty] := 513
	var_Column1:FormatColumn := "((1:=int(0:= (value))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')"
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:[PaneWidth,false] := 148
	var_Chart:FirstVisibleDate := SToD("20090406")
	var_Chart:LevelCount := 2
	var_Chart:UnitScale := exHour
	var_Chart:ResizeUnitScale := exMinute
oDCOCX_Exontrol1:Items:AllowCellValueToItemBar := true
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddBar(var_Items:AddItem("T1"),"Task",SToD("20090406 02:30:00"),SToD("20090406 12:35:00"),nil,nil)
	var_Items:AddBar(var_Items:AddItem("T2"),"Task",SToD("20090406 09:00:00"),SToD("20090406 10:10:00"),nil,nil)
oDCOCX_Exontrol1:EndUpdate()

1681
Does your control support working half-hour/minutes/seconds

local var_Bars as IBars
local var_Chart as IChart
local var_Column,var_Column1 as IColumn
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Tasks")}
	var_Column:AllowSizing := false
	var_Column:Width := 36
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("Working")}
	var_Column1:[Def,exCellValueToItemBarProperty] := 258
	var_Column1:FormatColumn := "((1:=int(0:= (value))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')"
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20090406")
	var_Chart:[PaneWidth,false] := 148
	var_Chart:LevelCount := 2
	var_Chart:UnitScale := exHour
	var_Chart:ResizeUnitScale := exMinute
	var_Chart:ResizeUnitCount := 15
	var_Chart:NonworkingHours := 15728767
	var_Chart:ShowNonworkingDates := false
	var_Chart:ShowNonworkingUnits := false
	var_Chart:ShowNonworkingHours := false
	var_Bars := var_Chart:Bars
		var_Bars:Add("Task:Split"):Shortcut := "Task"
		var_Bars:[Item,"Task"]:[Def,exBarKeepWorkingCount] := true
	var_Chart:AllowLinkBars := false
	var_Chart:UnitWidth := 26
oDCOCX_Exontrol1:Items:AllowCellValueToItemBar := true
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("T1")
	var_Items:[ItemNonworkingUnits,h,false] := "(weekday(value) in (1,2,3,4,5) and (timeF(value)<" + CHR(34) + "09:30" + CHR(34) + "  or timeF(value)>=" + CHR(34) + "17:30" + CHR(34) + ")) or (weekday(value) in (0,6))"
	var_Items:AddBar(h,"Task",SToD("20090406 10:00:00"),SToD("20090406 12:30:00"),nil,nil)
	h := var_Items:AddItem("T2")
	var_Items:[ItemNonworkingUnits,h,false] := "(weekday(value) in (1,2,3,4,5) and (timeF(value)<" + CHR(34) + "08:00" + CHR(34) + "  or timeF(value)>=" + CHR(34) + "16:00" + CHR(34) + ")) or (weekday(value) in (0,6))"
	var_Items:AddBar(h,"Task",SToD("20090406 09:30:00"),SToD("20090406 10:45:00"),nil,nil)
oDCOCX_Exontrol1:EndUpdate()

1680
How can I programmatically move a bar to a specified date-time
local var_Chart as IChart
local var_Items as IItems
local duration,h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:[PaneWidth,false] := 64
oDCOCX_Exontrol1:Columns:Add("Column")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Original")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010105"),"key",nil)
	h := var_Items:AddItem("Moved")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010105"),"key",nil)
	duration := var_Items:[ItemBar,h,"key",exBarDuration]
	var_Items:AddBar(h,"Task",SToD("20010105"),SToD("20010105"),"key",nil)
	var_Items:[ItemBar,h,"key",exBarDuration] := duration
oDCOCX_Exontrol1:EndUpdate()

1679
How can I programmatically move a bar, with a specified ammount
local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:[PaneWidth,false] := 64
oDCOCX_Exontrol1:Columns:Add("Column")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Original")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010105"),"key",nil)
	h := var_Items:AddItem("Moved")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010105"),"key",nil)
	var_Items:[ItemBar,h,"key",exBarMove] := 3
oDCOCX_Exontrol1:EndUpdate()

1678
How can I programmatically move a bar to a specified date-time (auto-adjust spans over a non-working period)

local var_Bars as IBars
local var_Chart as IChart
local var_Items as IItems
local h,workingCount as USUAL

oDCOCX_Exontrol1:BeginUpdate()
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:[PaneWidth,false] := 64
	var_Bars := var_Chart:Bars
		var_Bars:[Item,"Task"]:[Def,exBarKeepWorkingCount] := true
		var_Bars:Add("Task:Split"):Shortcut := "Task"
oDCOCX_Exontrol1:Columns:Add("Column")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Original")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010105"),"key",nil)
	h := var_Items:AddItem("Moved")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010105"),"key",nil)
	workingCount := var_Items:[ItemBar,h,"key",exBarWorkingCount]
	var_Items:AddBar(h,"Task",SToD("20010105"),SToD("20010105"),"key",nil)
	var_Items:[ItemBar,h,"key",exBarWorkingCount] := workingCount
oDCOCX_Exontrol1:EndUpdate()

1677
How can I programmatically move a bar, with a specified ammount (auto-adjust spans over a non-working period)

local var_Bars as IBars
local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:[PaneWidth,false] := 64
	var_Bars := var_Chart:Bars
		var_Bars:[Item,"Task"]:[Def,exBarKeepWorkingCount] := true
		var_Bars:Add("Task:Split"):Shortcut := "Task"
oDCOCX_Exontrol1:Columns:Add("Column")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Original")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010105"),"key",nil)
	h := var_Items:AddItem("Moved")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010105"),"key",nil)
	var_Items:[ItemBar,h,"key",exBarMove] := 3
oDCOCX_Exontrol1:EndUpdate()

1676
How can I show a secondary curve, line in the control's histogram

local var_Bar,var_Bar1 as IBar
local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Tasks")
oDCOCX_Exontrol1:AntiAliasing := true
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstWeekDay := exMonday
	var_Chart:LevelCount := 2
	var_Chart:[PaneWidth,false] := 40
	var_Chart:FirstVisibleDate := SToD("20050609")
	var_Chart:HistogramVisible := true
	var_Chart:HistogramView := exHistogramNoGrouping | exHistogramAllItems
	var_Chart:HistogramHeight := 128
	var_Bar := var_Chart:Bars:[Item,"Task"]
		var_Bar:HistogramPattern := var_Bar:Pattern
		var_Bar:HistogramType := exHistOverload
		var_Bar:HistogramItems := 8
		var_Bar:HistogramRulerLinesColor := RGB(0,0,1)
	var_Chart:[Level,1]:Label := "<font ;3><%d%>"
	var_Chart:UnitWidth := 9
	var_Bar1 := var_Chart:Bars:[Item,"Summary"]
		var_Bar1:HistogramPattern := exRoundCurve
		var_Bar1:HistogramColor := RGB(255,0,0)
		var_Bar1:HistogramType := exHistOverload
		var_Bar1:HistogramItems := 8
		var_Bar1:HistogramBorderSize := 1
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[LockedItemCount,exTop] := 1
	h := var_Items:[LockedItem,exTop,0]
	var_Items:[ItemHeight,h] := 0
	var_Items:AddBar(h,"Summary",SToD("20050101"),SToD("20051231"),"1",nil)
	var_Items:[ItemBar,h,"1",exBarEffort] := "(value mod 31) array (1,1,1,2,1,2.5,3,4,5,4,3,2,1,2,2,3,4.5,4,5,6,7,6,1,2,3,1,1,1,2,3,2,2)"
	h := var_Items:AddItem("Task")
	var_Items:AddBar(h,"Task",SToD("20050610"),SToD("20050716"),"",nil)
	var_Items:[ItemBar,h,"",exBarEffort] := "weekday(value) in (0,6) ? 0.25 : 2"
	h := var_Items:AddItem("Task")
	var_Items:AddBar(h,"Task",SToD("20050618"),SToD("20050721"),"",nil)
	var_Items:[ItemBar,h,"",exBarEffort] := "weekday(value) = 1 ? 2.5 : .5"
oDCOCX_Exontrol1:EndUpdate()

1675
How can I add an owner-draw bar
METHOD OCX_Exontrol1AfterDrawPart(Part,hDC,X,Y,Width,Height) CLASS MainDialog
	// AfterDrawPart event - Occurs right after drawing the part of the control.
	OutputDebugString(String2Psz( "AfterDrawPart" ))
	OutputDebugString(String2Psz( AsString(Part) ))
	OutputDebugString(String2Psz( oDCOCX_Exontrol1:Items:[CellCaption,oDCOCX_Exontrol1:DrawPartItem,0] ))
	OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:DrawPartKey) ))
RETURN NIL

METHOD OCX_Exontrol1BeforeDrawPart(Part,hDC,X,Y,Width,Height,Cancel) CLASS MainDialog
	// BeforeDrawPart event - Occurs just before drawing a part of the control.
	Cancel := true
	OutputDebugString(String2Psz( "BeforeDrawPart" ))
	OutputDebugString(String2Psz( AsString(Part) ))
	OutputDebugString(String2Psz( oDCOCX_Exontrol1:Items:[CellCaption,oDCOCX_Exontrol1:DrawPartItem,0] ))
	OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:DrawPartKey) ))
RETURN NIL

local var_Chart as IChart
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Task")
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:[PaneWidth,false] := 128
	var_Chart:LevelCount := 2
	var_Chart:Bars:Add("OwnerDraw")
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddBar(var_Items:AddItem("Draw-Item-Bar-1"),"OwnerDraw",SToD("20010102"),SToD("20010105"),"K1",nil)
	var_Items:AddBar(var_Items:AddItem("Draw-Item-Bar-2"),"OwnerDraw",SToD("20010106"),SToD("20010109"),"K1",nil)
	var_Items:[ItemBar,0,"<*>",exBarSelected] := true
oDCOCX_Exontrol1:EndUpdate()

1674
Is it possible to show a status left or right to the bar (method 2, exBarFrameColor, EBN)

local var_Appearance as IAppearance
local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
var_Appearance := oDCOCX_Exontrol1:VisualAppearance
	var_Appearance:Add(2,"gBFLBCJwBAEHhEJAAChABP0IQAAYAQGKIaBoAKBQAGaAoDDYMQyQwAAxDOKsEwsACEIrjKCRShyCYZRrGUQyAKESRAGyTJBlKKodgOLYYSrFcgSIAsEhqGASRZGUBIJDEMI4AJPIwxNIDfyNGKWI6gOQKIoSCYlU7IED0fQNGxVF6XaYqYAIRDINQlVzXcQzPYEbRxCKLKppWqIfpuSIBgI=")
	var_Appearance:Add(1,"CP:2 -8 -1 0 0")
	var_Appearance:Add(3,"CP:2 0 -1 0 0")
oDCOCX_Exontrol1:Columns:Add("Task")
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:[PaneWidth,false] := 128
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Red-Status-Outside")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010105"),"K1",nil)
	var_Items:[ItemBar,h,"K1",exBarFrameColor] := 16777471
	h := var_Items:AddItem("Blue-Status-Outside")
	var_Items:AddBar(h,"Task",SToD("20010103"),SToD("20010106"),"K1",nil)
	var_Items:[ItemBar,h,"K1",exBarFrameColor] := 33488896
	h := var_Items:AddItem("Red-Status-Inside")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010105"),"K1",nil)
	var_Items:[ItemBar,h,"K1",exBarFrameColor] := 50331903
	h := var_Items:AddItem("Blue-Status-Inside")
	var_Items:AddBar(h,"Task",SToD("20010103"),SToD("20010106"),"K1",nil)
	var_Items:[ItemBar,h,"K1",exBarFrameColor] := 67043328
oDCOCX_Exontrol1:EndUpdate()

1673
Is it possible to show a status left or right to the bar (method 1, exBarBackgroundExt)

local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Task")
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:[PaneWidth,false] := 128
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Red-Left-Status-Inside")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010105"),"K1",nil)
	var_Items:[ItemBar,h,"K1",exBarBackgroundExt] := "left[6,back=RGB(255,0,0)]"
	h := var_Items:AddItem("Blue-Left-Status-Inside")
	var_Items:AddBar(h,"Task",SToD("20010103"),SToD("20010106"),"K1",nil)
	var_Items:[ItemBar,h,"K1",exBarBackgroundExt] := "left[6,back=RGB(0,0,255)]"
	h := var_Items:AddItem("Red-Right-Status-Inside")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010105"),"K1",nil)
	var_Items:[ItemBar,h,"K1",exBarBackgroundExt] := "right[6,back=RGB(255,0,0)]"
	h := var_Items:AddItem("Blue-Right-Status-Inside")
	var_Items:AddBar(h,"Task",SToD("20010103"),SToD("20010106"),"K1",nil)
	var_Items:[ItemBar,h,"K1",exBarBackgroundExt] := "right[6,back=RGB(0,0,255)]"
oDCOCX_Exontrol1:EndUpdate()

1672
How can I use the ItemBar(exBarBackgroundExt) property for a bar

local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DefaultItemHeight := 31
oDCOCX_Exontrol1:DrawGridLines := exAllLines
oDCOCX_Exontrol1:GridLineColor := RGB(224,224,224)
oDCOCX_Exontrol1:BackColorLevelHeader := oDCOCX_Exontrol1:BackColor
oDCOCX_Exontrol1:Columns:Add("Task")
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:LevelCount := 2
	var_Chart:[Level,0]:GridLineColor := oDCOCX_Exontrol1:GridLineColor
	var_Chart:[Level,1]:GridLineColor := oDCOCX_Exontrol1:GridLineColor
	var_Chart:ShowNonworkingDates := false
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:[PaneWidth,false] := 128
	var_Chart:Bars:[Item,"Task"]:Height := 21
	var_Chart:DrawGridLines := exAllLines
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Normal")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010104"),"K1",nil)
	h := var_Items:AddItem("Red-Frame-Inside")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010105"),"K1",nil)
	var_Items:[ItemBar,h,"K1",exBarBackgroundExt] := "[frame=RGB(255,0,0),framethick]"
	h := var_Items:AddItem("LR-Margins")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010106"),"K1",nil)
	var_Items:[ItemBar,h,"K1",exBarBackgroundExt] := "left[4,back=RGB(0,255,0)],right[4,back=RGB(0,0,255)]"
	h := var_Items:AddItem("LR-Margins (front)")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010107"),"K1",nil)
	var_Items:[ItemBar,h,"K1",exBarBackgroundExt] := "left[4,back=RGB(0,255,0)],right[4,back=RGB(0,0,255)]"
	var_Items:[ItemBar,h,"K1",exBarBackgroundExtFlags] := 2
	h := var_Items:AddItem("LR-Margins (back)")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010108"),"K1",nil)
	var_Items:[ItemBar,h,"K1",exBarBackgroundExt] := "left[4,back=RGB(0,255,0)],right[4,back=RGB(0,0,255)]"
	var_Items:[ItemBar,h,"K1",exBarBackgroundExtFlags] := 3
	h := var_Items:AddItem("TB-Margins")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010109"),"K1",nil)
	var_Items:[ItemBar,h,"K1",exBarBackgroundExt] := "top[4,back=RGB(255,0,0)],bottom[4,back=RGB(0,255,0)]"
	h := var_Items:AddItem("TB-Margins")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010110"),"K1",nil)
	var_Items:[ItemBar,h,"K1",exBarBackgroundExt] := "top[2,back=RGB(255,0,0)],bottom[2,back=RGB(0,255,0)]"
	var_Items:[ItemBar,h,"K1",exBarBackgroundExtFlags] := 2
	h := var_Items:AddItem("Caption(back)")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010111"),"K1",nil)
	var_Items:[ItemBar,h,"K1",exBarBackgroundExt] := "client(bottom[14,text=`<sha ;;0><font ;8>background`,align=0x11])"
	var_Items:[ItemBar,h,"K1",exBarBackgroundExtFlags] := 2
	h := var_Items:AddItem("Pattern-Outside")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010112"),"K1",nil)
	var_Items:[ItemBar,h,"K1",exBarBackgroundExt] := "bottom[10%,pattern=7,frame]"
	var_Items:[ItemBar,h,"K1",exBarBackgroundExtFlags] := 2
	h := var_Items:AddItem("Pattern-Inside")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010113"),"K1",nil)
	var_Items:[ItemBar,h,"K1",exBarBackgroundExt] := "bottom[7,pattern=3,frame]"
	h := var_Items:AddItem("Pattern-Inside-Caption")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010112"),"K1",nil)
	var_Items:[ItemBar,h,"K1",exBarBackgroundExt] := "top[4](left[4],right[4],client),bottom[4](left[4],right[4],client),left[4],right[4],client(left[75%,text=`<fgcolor FFFFFF>75%`,align=0x11,pattern=0x001,frame=RGB(255,0,0)])"
	h := var_Items:AddItem("Complex(back)")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010111"),"K1",nil)
	var_Items:[ItemBar,h,"K1",exBarBackgroundExt] := "top[30%,back=RGB(253,218,101)],client[back=RGB(91,157,210)],none[(0%,0%,10%,100%)](top[90%,back=RGB(0,0,0)])"
	var_Items:[ItemBar,h,"K1",exBarBackgroundExtFlags] := 3
	h := var_Items:AddItem("Complex(inside)")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010112"),"K1",nil)
	var_Items:[ItemBar,h,"K1",exBarBackgroundExt] := "top[30%,back=RGB(253,218,101)],client[back=RGB(91,157,210)],none[(0%,0%,10%,100%)](top[90%,back=RGB(0,0,0)])"
oDCOCX_Exontrol1:EndUpdate()

1671
How can display seconds

local var_Chart as IChart
local var_Items as IItems

var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:[PaneWidth,false] := 96
	var_Chart:FirstVisibleDate := SToD("20080117")
	var_Chart:LevelCount := 2
	var_Chart:UnitScale := exSecond
	var_Chart:[Level,0]:Alignment := exHOutside | CenterAlignment
	var_Chart:[Level,1]:FormatLabel := "(0:=sec(dvalue)) mod 10 ? 0=: : '<c><font ;6>sec<br><b>' + 0=:"
oDCOCX_Exontrol1:Columns:Add("Tasks")
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddBar(var_Items:AddItem("Task 1"),"Task",SToD("20080117 00:00:02"),SToD("20080117 00:00:08"),nil,nil)
	var_Items:AddBar(var_Items:AddItem("Task 2"),"Task",SToD("20080117 00:00:05"),SToD("20080117 00:00:15"),nil,nil)

1670
How can I check if an item contains a bar
METHOD OCX_Exontrol1SelectionChanged() CLASS MainDialog
	// SelectionChanged event - Fired after a new item has been selected.
	local var_Items as IItems
	var_Items := oDCOCX_Exontrol1:Items
		OutputDebugString(String2Psz( "Count of A: " ))
		OutputDebugString(String2Psz( AsString(var_Items:[ItemBar,var_Items:FocusItem,"A",exBarsCount]) ))
		OutputDebugString(String2Psz( "Count of B: " ))
		OutputDebugString(String2Psz( AsString(var_Items:[ItemBar,var_Items:FocusItem,"B",exBarsCount]) ))
		OutputDebugString(String2Psz( "Count of C: " ))
		OutputDebugString(String2Psz( AsString(var_Items:[ItemBar,var_Items:FocusItem,"C",exBarsCount]) ))
RETURN NIL

local var_Chart as IChart
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Task")
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:LevelCount := 2
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:[PaneWidth,false] := 48
	var_Chart:Bars:[Item,"Task"]:[Def,exBarHAlignCaption] := 18
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddBar(var_Items:AddItem("Task"),"Task",SToD("20010102"),SToD("20010104"),"A","A")
	var_Items:AddBar(var_Items:AddItem("Task"),"Task",SToD("20010102"),SToD("20010104"),"B","B")
	var_Items:AddBar(var_Items:AddItem("Task"),"Task",SToD("20010102"),SToD("20010104"),"C","C")
oDCOCX_Exontrol1:EndUpdate()

1669
How can I connect to a DBF file
local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:ContinueColumnScroll := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADODB.Recordset"}
	rs:Open("Select * From foxcode.DBF","Provider=vfpoledb;Data Source=C:\Program Files\Microsoft Visual FoxPro 9\",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:Chart:[PaneWidth,true] := 0
oDCOCX_Exontrol1:EndUpdate()

1668
How do I get the caption with no HTML format

local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:Columns:Add("Default")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("This is a bit of <b>HTML-formatted</b> text")
	var_Items:[CellValueFormat,h,0] := exHTML
	var_Items:AddItem(var_Items:[CellCaption,h,0])

1667
How can I change the bar's color based on its length/duration

local var_Chart as IChart
local var_Column as IColumn
local var_Columns as IColumns
local var_ConditionalFormat as IConditionalFormat
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
var_Columns := oDCOCX_Exontrol1:Columns
	var_Columns:Add("Tasks")
	var_Column := IColumn{var_Columns:Add("Duration")}
		var_Column:[Def,exCellValueToItemBarProperty] := 513
		var_Column:Editor:EditType := SpinType
oDCOCX_Exontrol1:Items:AllowCellValueToItemBar := true
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstWeekDay := exMonday
	var_Chart:LevelCount := 2
	var_Chart:FirstVisibleDate := SToD("20050606")
	var_Chart:[PaneWidth,false] := 128
var_ConditionalFormat := oDCOCX_Exontrol1:ConditionalFormats:Add("%1 >= 4",nil)
	var_ConditionalFormat:ApplyTo := 0x1 | 
	var_ConditionalFormat:Bold := true
	var_ConditionalFormat:ApplyToBars := "Task"
	var_ConditionalFormat:BarColor := RGB(255,0,0)
	var_ConditionalFormat:ForeColor := var_ConditionalFormat:BarColor
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddBar(var_Items:AddItem("Task"),"Task",SToD("20050610"),SToD("20050613"),"",nil)
	var_Items:AddBar(var_Items:AddItem("Task"),"Task",SToD("20050611"),SToD("20050616"),"",nil)
	var_Items:AddBar(var_Items:AddItem("Task"),"Task",SToD("20050612"),SToD("20050615"),"",nil)
oDCOCX_Exontrol1:EndUpdate()

1666
Is it possible to colorize the bars based on its starting/ending date

local var_Chart as IChart
local var_Column as IColumn
local var_Columns as IColumns
local var_ConditionalFormat as IConditionalFormat
local var_InsideZoomFormat as IInsideZoomFormat
local var_InsideZooms as IInsideZooms
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:OnResizeControl := exDisableSplitter | exResizeChart
var_Columns := oDCOCX_Exontrol1:Columns
	var_Columns:Add("Tasks")
	var_Column := IColumn{var_Columns:Add("Start")}
		var_Column:[Def,exCellValueToItemBarProperty] := 1
		var_Column:Visible := false
oDCOCX_Exontrol1:Items:AllowCellValueToItemBar := true
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstWeekDay := exMonday
	var_Chart:LevelCount := 2
	var_Chart:FirstVisibleDate := SToD("20050531")
	var_Chart:[PaneWidth,false] := 0
	var_Chart:AllowInsideZoom := true
	var_Chart:AllowResizeInsideZoom := false
	var_Chart:InsideZoomOnDblClick := false
	var_InsideZoomFormat := var_Chart:DefaultInsideZoomFormat
		var_InsideZoomFormat:PatternChart := exPatternBDiagonal
		var_InsideZoomFormat:PatternColorChart := RGB(255,0,0)
		var_InsideZoomFormat:ForeColor := var_InsideZoomFormat:PatternColorChart
	var_InsideZooms := var_Chart:InsideZooms
		var_InsideZooms:SplitBaseLevel := false
		var_InsideZooms:DefaultWidth := 18
		var_InsideZooms:Add(SToD("20050610")):AllowInsideFormat := false
var_ConditionalFormat := oDCOCX_Exontrol1:ConditionalFormats:Add("%1 <= #6/10/2005#",nil)
	var_ConditionalFormat:ApplyToBars := "Task"
	var_ConditionalFormat:BarColor := RGB(255,0,0)
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddBar(var_Items:AddItem("Task"),"Task",SToD("20050610"),SToD("20050614"),"",nil)
	var_Items:AddBar(var_Items:AddItem("Task"),"Task",SToD("20050611"),SToD("20050615"),"",nil)
	var_Items:AddBar(var_Items:AddItem("Task"),"Task",SToD("20050612"),SToD("20050616"),"",nil)
oDCOCX_Exontrol1:EndUpdate()

1665
How can I change the bar's color based on values on the columns

METHOD OCX_Exontrol1AddItem(Item) CLASS MainDialog
	// AddItem event - Occurs after a new Item has been inserted to Items collection.
	local var_Items as IItems
	var_Items := oDCOCX_Exontrol1:Items
		var_Items:AddBar(Item,"Task",var_Items:[CellValue,Item,2],var_Items:[CellValue,Item,4],nil,nil)
RETURN NIL

local var_Chart as IChart
local var_ConditionalFormat,var_ConditionalFormat1,var_ConditionalFormat2 as IConditionalFormat
local var_ConditionalFormats as IConditionalFormats
local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("19940803")
	var_Chart:[PaneWidth,false] := 256
	var_Chart:LevelCount := 2
	var_Chart:UnitScale := exDay
	var_Chart:FirstWeekDay := exMonday
	var_Chart:OverviewVisible := exOverviewShowAllVisible
oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:ContinueColumnScroll := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:Items:AllowCellValueToItemBar := true
oDCOCX_Exontrol1:Columns:[Item,2]:[Def,exCellValueToItemBarProperty] := 1
oDCOCX_Exontrol1:Columns:[Item,4]:[Def,exCellValueToItemBarProperty] := 2
var_ConditionalFormats := oDCOCX_Exontrol1:ConditionalFormats
	var_ConditionalFormat := var_ConditionalFormats:Add("1",nil)
		var_ConditionalFormat:ApplyTo := 0x1 | 
		var_ConditionalFormat:Bold := true
		var_ConditionalFormat:BackColor := RGB(250,250,250)
	var_ConditionalFormat1 := var_ConditionalFormats:Add("%1 = 5",nil)
		var_ConditionalFormat1:ApplyToBars := "Task"
		var_ConditionalFormat1:BarColor := RGB(255,0,0)
		var_ConditionalFormat1:ForeColor := RGB(255,0,0)
		var_ConditionalFormat1:BarOverviewColor := RGB(255,0,0)
	var_ConditionalFormat2 := var_ConditionalFormats:Add("%1 = 3",nil)
		var_ConditionalFormat2:ApplyToBars := "Task"
		var_ConditionalFormat2:BarColor := RGB(0,255,0)
		var_ConditionalFormat2:ForeColor := RGB(0,255,0)
		var_ConditionalFormat2:BarOverviewColor := RGB(0,255,0)
oDCOCX_Exontrol1:EndUpdate()

1664
How can I display / specify a fixed percent for the task in the histogram, no matter how long the task is

local var_Bar,var_Bar1,var_Bar2 as IBar
local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DefaultItemHeight := 32
oDCOCX_Exontrol1:Columns:Add("Tasks")
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:UnitWidth := 32
	var_Chart:LevelCount := 2
	var_Chart:NonworkingDays := 0
	var_Chart:[PaneWidth,false] := 64
	var_Chart:FirstVisibleDate := SToD("20050620")
	var_Chart:HistogramVisible := true
	var_Chart:HistogramView := exHistogramAllItems
	var_Chart:HistogramHeight := 64
	var_Bar := var_Chart:Bars:[Item,"Task"]
		var_Bar:HistogramPattern := var_Bar:Pattern
		var_Bar:HistogramType := exHistOverAllocation
		var_Bar:ShowHistogramValues := AsString(1)
	var_Bar1 := var_Chart:Bars:Copy("Task","TaskFixed")
		var_Bar1:HistogramType := exHistOverAllocationFixed | exHistOverAllocation
		var_Bar1:ShowHistogramValues := AsString(1)
	var_Bar2 := var_Chart:Bars:Copy("Task","TaskMultiply")
		var_Bar2:HistogramType := exHistOverAllocationMultiply | exHistOverAllocation
		var_Bar2:ShowHistogramValues := AsString(1)
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Allocation")
	var_Items:AddBar(h,"Task",SToD("20050621"),SToD("20050623"),"A","Effort/Length")
	var_Items:[ItemBar,h,"A",exBarEffort] := 0.25
	var_Items:[ItemBar,h,"A",exBarVAlignCaption] := 18
	var_Items:AddBar(h,"TaskFixed",SToD("20050624"),SToD("20050626"),"B","Effort")
	var_Items:[ItemBar,h,"B",exBarEffort] := 0.25
	var_Items:[ItemBar,h,"B",exBarVAlignCaption] := 18
	var_Items:AddBar(h,"TaskMultiply",SToD("20050627"),SToD("20050629"),"C","Effort*Length")
	var_Items:[ItemBar,h,"C",exBarEffort] := 0.25
	var_Items:[ItemBar,h,"C",exBarVAlignCaption] := 18
oDCOCX_Exontrol1:EndUpdate()

1663
Does your control supports scrolling by touching the screen

METHOD OCX_Exontrol1AddItem(Item) CLASS MainDialog
	// AddItem event - Occurs after a new Item has been inserted to Items collection.
	local var_Items as IItems
	var_Items := oDCOCX_Exontrol1:Items
		var_Items:AddBar(Item,"Task",var_Items:[CellValue,Item,2],var_Items:[CellValue,Item,4],nil,nil)
RETURN NIL

local var_Chart as IChart
local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("19940803")
	var_Chart:[PaneWidth,false] := 256
	var_Chart:LevelCount := 2
	var_Chart:UnitScale := exDay
	var_Chart:FirstWeekDay := exMonday
	var_Chart:OverviewVisible := exOverviewShowAllVisible
oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:ContinueColumnScroll := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:Items:AllowCellValueToItemBar := true
oDCOCX_Exontrol1:Columns:[Item,2]:[Def,exCellValueToItemBarProperty] := 1
oDCOCX_Exontrol1:Columns:[Item,4]:[Def,exCellValueToItemBarProperty] := 2
oDCOCX_Exontrol1:ContinueColumnScroll := true
oDCOCX_Exontrol1:ScrollBySingleLine := true
oDCOCX_Exontrol1:Chart:AllowCreateBar := exNoCreateBar
oDCOCX_Exontrol1:AutoDrag := exAutoDragScrollOnShortTouch | exAutoDragScroll
oDCOCX_Exontrol1:EndUpdate()

1662
Is it possible to use build-in zoom-functionality to zoom time periods spanning to just some hours of one day (zoom-onfly)

local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Task")
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:UnitScale := exDay
	var_Chart:[PaneWidth,false] := 0
	var_Chart:LevelCount := 2
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:DrawGridLines := exAllLines
	var_Chart:AllowZoomOnFly := exZoomOnFly
	var_Chart:ResizeUnitScale := exHour
	var_Chart:ResizeUnitCount := 4
	var_Chart:[Label,exHour] := "<font ;5><b><%h%><br><%AM/PM%></b></font><||>4<||>65536"
	var_Chart:ZoomOnFlyCaption := "<br><c><b><font ;12><%=%C0%>"
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Task 1")
	var_Items:AddBar(h,"Task",SToD("20010107"),SToD("20010110"),"T1","T1")
	var_Items:AddBar(h,"Task",SToD("20010111"),SToD("20010114"),"T3","T3")
	h := var_Items:AddItem(nil)
	var_Items:AddBar(h,"",SToD("20010115"),SToD("20010115"),"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown.")
	var_Items:[SelectableItem,h] := false
oDCOCX_Exontrol1:EndUpdate()

1661
Is it possible to use build-in zoom-functionality to zoom time periods spanning to just some hours of one day (inside-zoom)

local var_Chart as IChart
local var_InsideZoomFormat as IInsideZoomFormat
local var_InsideZooms as IInsideZooms

oDCOCX_Exontrol1:BeginUpdate()
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:UnitScale := exDay
	var_Chart:[PaneWidth,false] := 0
	var_Chart:LevelCount := 2
	var_Chart:FirstVisibleDate := SToD("20080101")
	var_InsideZoomFormat := var_Chart:DefaultInsideZoomFormat
		var_InsideZoomFormat:InsideLabel := "<%hh%>"
		var_InsideZoomFormat:InsideUnit := exHour
		var_InsideZoomFormat:InsideCount := 8
	var_Chart:AllowInsideZoom := true
	var_InsideZooms := var_Chart:InsideZooms
		var_InsideZooms:Add(SToD("20080104"))
	var_Chart:DrawGridLines := exAllLines
oDCOCX_Exontrol1:EndUpdate()

1660
How can I export the control's content to a PDF document (method 1)
local var_Chart as IChart
local var_Column,var_Column1 as IColumn
local var_Columns as IColumns
local var_Print as IExPrint
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:MarkSearchColumn := false
var_Columns := oDCOCX_Exontrol1:Columns
	var_Columns:Add("Tasks")
	var_Column := IColumn{var_Columns:Add("Start")}
		var_Column:[Def,exCellValueToItemBarProperty] := 1
		var_Column:Editor:EditType := SpinType
	var_Column1 := IColumn{var_Columns:Add("End")}
		var_Column1:[Def,exCellValueToItemBarProperty] := 2
		var_Column1:Editor:EditType := SpinType
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:[PaneWidth,false] := 196
	var_Chart:LevelCount := 2
	var_Chart:ShowEmptyBars := 1
	var_Chart:FirstVisibleDate := SToD("20090101")
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AllowCellValueToItemBar := true
	var_Items:AddBar(var_Items:AddItem("Task 1"),"Task",SToD("20090102"),SToD("20090107"),nil,nil)
	var_Items:AddBar(var_Items:AddItem("Task 2"),"Task",SToD("20090104"),SToD("20090109"),nil,nil)
// Generate Source for 'ExPrint 1.0 Control Library(ExPrint.dll)' server from Tools\Automation Server...
var_Print := IExPrint{"Exontrol.Print"}
	var_Print:PrintExt := oDCOCX_Exontrol1
	var_Print:CopyTo("c:/temp/xtest.pdf")
OutputDebugString(String2Psz( "Look for C:\Temp\xtest.pdf file." ))
oDCOCX_Exontrol1:EndUpdate()

1659
How can I export the control's content to a PDF document (method 2)
local var_Chart as IChart
local var_Column,var_Column1 as IColumn
local var_Columns as IColumns
local var_Items as IItems
local var_CopyTo as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:MarkSearchColumn := false
var_Columns := oDCOCX_Exontrol1:Columns
	var_Columns:Add("Tasks")
	var_Column := IColumn{var_Columns:Add("Start")}
		var_Column:[Def,exCellValueToItemBarProperty] := 1
		var_Column:Editor:EditType := SpinType
	var_Column1 := IColumn{var_Columns:Add("End")}
		var_Column1:[Def,exCellValueToItemBarProperty] := 2
		var_Column1:Editor:EditType := SpinType
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:[PaneWidth,false] := 196
	var_Chart:LevelCount := 2
	var_Chart:ShowEmptyBars := 1
	var_Chart:FirstVisibleDate := SToD("20090101")
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AllowCellValueToItemBar := true
	var_Items:AddBar(var_Items:AddItem("Task 1"),"Task",SToD("20090102"),SToD("20090107"),nil,nil)
	var_Items:AddBar(var_Items:AddItem("Task 2"),"Task",SToD("20090104"),SToD("20090109"),nil,nil)
var_CopyTo := oDCOCX_Exontrol1:[CopyTo,"c:/temp/xtest.pdf"]
OutputDebugString(String2Psz( "Look for C:\Temp\xtest.pdf file." ))
oDCOCX_Exontrol1:EndUpdate()

1658
Today date is shown, if we use the Column.FormatColumn and Editor.Option(exDateAllowNullDate) properties. What can be done

local var_Column as IColumn
local var_Editor as IEditor
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Date")}
	var_Column:FormatColumn := "len(value) ? ( (longdate(date(value)) left 3) + ' ' + day(date(value)) + '/' + month(date(value)) + '/' + (year(date(value)) right 2) ) : '' )"
	var_Editor := var_Column:Editor
		var_Editor:EditType := DateType
		var_Editor:[Option,exDateAllowNullDate] := true
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem(SToD("20120512"))
	var_Items:AddItem(nil)
	var_Items:AddItem(SToD("20120514"))
oDCOCX_Exontrol1:EndUpdate()

1657
Is there a syntax for conditional formatting of items, based on CellState/CellStateChange

METHOD OCX_Exontrol1CellStateChanged(Item,ColIndex) CLASS MainDialog
	// CellStateChanged event - Fired after cell's state has been changed.
	local var_Items as IItems
	var_Items := oDCOCX_Exontrol1:Items
		var_Items:[CellValue,Item,2] := var_Items:[CellState,Item,0]
RETURN NIL

local var_Column as IColumn
local var_ConditionalFormat as IConditionalFormat
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ShowFocusRect := false
oDCOCX_Exontrol1:SelBackMode := exTransparent
var_ConditionalFormat := oDCOCX_Exontrol1:ConditionalFormats:Add("%2 != 0",nil)
	var_ConditionalFormat:Bold := true
	var_ConditionalFormat:ForeColor := RGB(255,0,0)
	var_ConditionalFormat:ApplyTo := exFormatToItems
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("")}
	var_Column:[Def,exCellHasCheckBox] := true
	var_Column:Width := 16
	var_Column:AllowSizing := false
oDCOCX_Exontrol1:Columns:Add("Information")
IColumn{oDCOCX_Exontrol1:Columns:Add("Hidden")}:Visible := false
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellValue,var_Items:AddItem(""),1] := "This is a bit of text associated"
	h := var_Items:AddItem("")
	var_Items:[CellValue,h,1] := "This is a bit of text associated"
	var_Items:[CellState,h,0] := 1
	var_Items:[CellValue,var_Items:AddItem(""),1] := "This is a bit of text associated"
oDCOCX_Exontrol1:EndUpdate()

1656
How can I hide the items/grid section of the control

local var_Bar as IBar
local var_Chart as IChart
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:OnResizeControl := exDisableSplitter | exResizeChart
oDCOCX_Exontrol1:Columns:Add("Tasks")
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstWeekDay := exMonday
	var_Chart:LevelCount := 2
	var_Chart:FirstVisibleDate := SToD("20050609")
	var_Chart:HistogramVisible := true
	var_Chart:HistogramView := exHistogramAllItems
	var_Chart:HistogramHeight := 128
	var_Bar := var_Chart:Bars:[Item,"Task"]
		var_Bar:HistogramPattern := var_Bar:Pattern
	var_Chart:[PaneWidth,false] := 0
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddBar(var_Items:AddItem("Task"),"Task",SToD("20050610"),SToD("20050614"),"",nil)
	var_Items:AddBar(var_Items:AddItem("Task"),"Task",SToD("20050611"),SToD("20050615"),"",nil)
	var_Items:AddBar(var_Items:AddItem("Task"),"Task",SToD("20050612"),SToD("20050616"),"",nil)
oDCOCX_Exontrol1:EndUpdate()

1655
How can I draw an extra line which could indicate deadline for my tasks

local var_Appearance as IAppearance
local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DefaultItemHeight := 24
var_Appearance := oDCOCX_Exontrol1:VisualAppearance
	var_Appearance:Add(2,"gBFLBCJwBAEHhEJAAChABLMIQAAYAQGKIaBoAKBQAGaAoDDQOQ4QwAAxjAKUEwsACEIrjKCYVgOHYYRrIIEvZAAMIlSbCMoxcAsSQSf6YJBmKL4fiWMobRCMQyiLLMdwiGoYJ4hGgKChqI43RZNErURRkEwCgIA=")
	var_Appearance:Add(1,"CP:2 0 -4 0 4")
oDCOCX_Exontrol1:Columns:Add("Task")
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:[PaneWidth,false] := 128
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Default")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010105"),"K1",nil)
	var_Items:[ItemBar,h,"K1",exBarFrameColor] := 16777471
	var_Items:AddBar(h,"Task",SToD("20010109"),SToD("20010114"),"K2",nil)
	var_Items:[ItemBar,h,"K2",exBarFrameColor] := 33488896
oDCOCX_Exontrol1:EndUpdate()

1654
How can I mark/highlight a zone in the control's histogram

local var_Bar as IBar
local var_Chart as IChart
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Tasks")
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstWeekDay := exMonday
	var_Chart:LevelCount := 2
	var_Chart:[PaneWidth,false] := 40
	var_Chart:FirstVisibleDate := SToD("20050609")
	var_Chart:HistogramVisible := true
	var_Chart:HistogramView := exHistogramAllItems
	var_Chart:HistogramHeight := 128
	var_Bar := var_Chart:Bars:[Item,"Task"]
		var_Bar:HistogramPattern := var_Bar:Pattern
		var_Bar:HistogramType := exHistOverload
		var_Bar:HistogramItems := 12
		var_Bar:HistogramRulerLinesColor := RGB(0,0,1)
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddBar(var_Items:AddItem("Task"),"Task",SToD("20050610"),SToD("20050614"),"",nil)
	var_Items:AddBar(var_Items:AddItem("Task"),"Task",SToD("20050611"),SToD("20050615"),"",nil)
	var_Items:AddBar(var_Items:AddItem("Task"),"Task",SToD("20050612"),SToD("20050616"),"",nil)
oDCOCX_Exontrol1:Chart:MarkTimeZone("zone",SToD("20050613"),SToD("20050614"),15790320,";;;;histogram;1")
oDCOCX_Exontrol1:EndUpdate()

1653
How can I get the min/max values from the histogram
METHOD OCX_Exontrol1MouseMove(Button,Shift,X,Y) CLASS MainDialog
	// MouseMove event - Occurs when the user moves the mouse.
	local var_Chart as IChart
	var_Chart := oDCOCX_Exontrol1:Chart
		OutputDebugString(String2Psz( "Value" ))
		OutputDebugString(String2Psz( AsString(var_Chart:[HistogramValue,var_Chart:[DateFromPoint,-1,-1],nil,nil]) ))
		OutputDebugString(String2Psz( "MIN" ))
		OutputDebugString(String2Psz( AsString(var_Chart:[HistogramValue,"min",nil,nil]) ))
		OutputDebugString(String2Psz( "MAX" ))
		OutputDebugString(String2Psz( AsString(var_Chart:[HistogramValue,"max",nil,nil]) ))
RETURN NIL

local var_Bar as IBar
local var_Chart as IChart
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Tasks")
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstWeekDay := exMonday
	var_Chart:LevelCount := 2
	var_Chart:[PaneWidth,false] := 40
	var_Chart:FirstVisibleDate := SToD("20050609")
	var_Chart:HistogramVisible := true
	var_Chart:HistogramView := exHistogramAllItems
	var_Chart:HistogramHeight := 128
	var_Bar := var_Chart:Bars:[Item,"Task"]
		var_Bar:HistogramPattern := var_Bar:Pattern
		var_Bar:HistogramType := exHistOverload
		var_Bar:HistogramItems := 12
		var_Bar:HistogramRulerLinesColor := RGB(0,0,1)
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddBar(var_Items:AddItem("Task"),"Task",SToD("20050610"),SToD("20050614"),"",nil)
	var_Items:AddBar(var_Items:AddItem("Task"),"Task",SToD("20050611"),SToD("20050615"),"",nil)
	var_Items:AddBar(var_Items:AddItem("Task"),"Task",SToD("20050612"),SToD("20050616"),"",nil)
oDCOCX_Exontrol1:EndUpdate()

1652
How can I assign different efforts(expression) to the same bar

local var_Bar as IBar
local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Tasks")
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstWeekDay := exMonday
	var_Chart:LevelCount := 2
	var_Chart:[PaneWidth,false] := 40
	var_Chart:FirstVisibleDate := SToD("20050609")
	var_Chart:HistogramVisible := true
	var_Chart:HistogramView := exHistogramAllItems
	var_Chart:HistogramHeight := 128
	var_Bar := var_Chart:Bars:[Item,"Task"]
		var_Bar:HistogramPattern := var_Bar:Pattern
		var_Bar:HistogramType := exHistOverload
		var_Bar:HistogramItems := 12
		var_Bar:HistogramRulerLinesColor := RGB(0,0,1)
	var_Chart:[Level,1]:Label := "<font ;3><%d%>"
	var_Chart:UnitWidth := 9
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Task")
	var_Items:AddBar(h,"Task",SToD("20050610"),SToD("20050614"),"",nil)
	var_Items:[ItemBar,h,"",exBarEffort] := "weekday(value) in (0,6) ? 0.25 : 2"
	h := var_Items:AddItem("Task")
	var_Items:AddBar(h,"Task",SToD("20050618"),SToD("20050621"),"",nil)
	var_Items:[ItemBar,h,"",exBarEffort] := "weekday(value) = 1 ? 2 : 1"
	h := var_Items:AddItem("Task")
	var_Items:AddBar(h,"Task",SToD("20050627"),SToD("20050709"),"",nil)
	var_Items:[ItemBar,h,"",exBarEffort] := "month (value) = 7 ? 1 : 0"
	h := var_Items:AddItem("Task")
	var_Items:AddBar(h,"Task",SToD("20050627"),SToD("20050705"),"",nil)
	var_Items:[ItemBar,h,"",exBarEffort] := "(month(value)=month(value+1)) ? 1 : 0"
	h := var_Items:AddItem("Task")
	var_Items:AddBar(h,"Task",SToD("20050622"),SToD("20050626"),"",nil)
	var_Items:[ItemBar,h,"",exBarEffort] := "int(value-start) ? 1 : 2"
	h := var_Items:AddItem("Task")
	var_Items:AddBar(h,"Task",SToD("20050710"),SToD("20050714"),"",nil)
	var_Items:[ItemBar,h,"",exBarEffort] := "(int(value-start) and int(end-value) != 0 ) ? 1 : 2"
	h := var_Items:AddItem("Task")
	var_Items:AddBar(h,"Task",SToD("20050715"),SToD("20050722"),"",nil)
	var_Items:[ItemBar,h,"",exBarEffort] := "(int(value-start)+1) mod 2 ? 1 : 0"
oDCOCX_Exontrol1:EndUpdate()

1651
How can I prevent showing the representation of the bar on the week days, nonworking part

local var_Bar as IBar
local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Tasks")
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:LevelCount := 2
	var_Chart:[PaneWidth,false] := 40
	var_Chart:FirstVisibleDate := SToD("20050609")
	var_Chart:HistogramVisible := true
	var_Chart:HistogramView := exHistogramAllItems
	var_Chart:HistogramHeight := 128
	var_Bar := var_Chart:Bars:[Item,"Task"]
		var_Bar:HistogramPattern := var_Bar:Pattern
		var_Bar:HistogramType := exHistOverload
		var_Bar:HistogramItems := 12
		var_Bar:HistogramRulerLinesColor := RGB(0,0,1)
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Task")
	var_Items:AddBar(h,"Task",SToD("20050610"),SToD("20050621"),"",nil)
	var_Items:[ItemBar,h,"",exBarEffort] := "weekday(value) in (0,6) ? 0 : 2"
oDCOCX_Exontrol1:EndUpdate()

1650
How do I programatically focus a cell
METHOD OCX_Exontrol1FocusChanged() CLASS MainDialog
	// FocusChanged event - Occurs when a cell gets the focus.
	local var_Items as IItems
	var_Items := oDCOCX_Exontrol1:Items
		var_Items:[CellBackColor,var_Items:FocusItem,oDCOCX_Exontrol1:FocusColumnIndex] := RGB(255,0,0)
RETURN NIL

local var_Columns as IColumns
local var_Items,var_Items1 as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SelForeColor := oDCOCX_Exontrol1:ForeColor
oDCOCX_Exontrol1:SelBackColor := oDCOCX_Exontrol1:BackColor
oDCOCX_Exontrol1:DrawGridLines := exRowLines
var_Columns := oDCOCX_Exontrol1:Columns
	var_Columns:Add("Column1")
	var_Columns:Add("Column2")
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellValue,var_Items:AddItem("Cell 1.1"),1] := "Cell 1.2"
	var_Items:[CellValue,var_Items:AddItem("Cell 2.1"),1] := "Cell 2.2"
var_Items1 := oDCOCX_Exontrol1:Items
	var_Items1:[SelectItem,var_Items1:[ItemByIndex,1]] := true
oDCOCX_Exontrol1:FocusColumnIndex := 1
oDCOCX_Exontrol1:EndUpdate()

1649
How do I programatically focus a cell (excrd)
METHOD OCX_Exontrol1FocusChanged() CLASS MainDialog
	// FocusChanged event - Occurs when a cell gets the focus.
	local var_Items as IItems
	var_Items := oDCOCX_Exontrol1:Items
		var_Items:[CellBackColor,var_Items:FocusItem,oDCOCX_Exontrol1:FocusColumnIndex] := RGB(255,0,0)
RETURN NIL

local var_Column as IColumn
local var_Columns as IColumns
local var_Items,var_Items1 as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SelForeColor := oDCOCX_Exontrol1:ForeColor
oDCOCX_Exontrol1:SelBackColor := oDCOCX_Exontrol1:BackColor
oDCOCX_Exontrol1:DrawGridLines := exRowLines
oDCOCX_Exontrol1:DefaultItemHeight := 36
var_Columns := oDCOCX_Exontrol1:Columns
	IColumn{var_Columns:Add("Column1")}:Visible := false
	IColumn{var_Columns:Add("Column2")}:Visible := false
	IColumn{var_Columns:Add("Column3")}:Visible := false
	var_Column := IColumn{var_Columns:Add("FormatLevel")}
		var_Column:FormatLevel := "(0/1),2"
		var_Column:[Def,exCellFormatLevel] := var_Column:FormatLevel
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Cell 1.1")
	var_Items:[CellValue,h,1] := "Cell 1.2"
	var_Items:[CellValue,h,2] := "Cell 1.3"
	h := var_Items:AddItem("Cell 2.1")
	var_Items:[CellValue,h,1] := "Cell 2.2"
	var_Items:[CellValue,h,2] := "Cell 2.3"
var_Items1 := oDCOCX_Exontrol1:Items
	var_Items1:[SelectItem,var_Items1:[ItemByIndex,1]] := true
oDCOCX_Exontrol1:FocusColumnIndex := 2
oDCOCX_Exontrol1:EndUpdate()

1648
How can I get task's user data ( exBarData ) when user double clicks the bar
METHOD OCX_Exontrol1DblClick(Shift,X,Y) CLASS MainDialog
	// DblClick event - Occurs when the user dblclk the left mouse button over an object.
	local item,key as USUAL
	item := oDCOCX_Exontrol1:[ItemFromPoint,-1,-1,c,hit]
	key := oDCOCX_Exontrol1:Chart:[BarFromPoint,-1,-1]
	OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:Items:[ItemBar,item,key,exBarData]) ))
RETURN NIL

local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Task")
oDCOCX_Exontrol1:Chart:FirstVisibleDate := SToD("20010101")
oDCOCX_Exontrol1:Chart:[PaneWidth,false] := 48
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Task 1")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010105"),"",nil)
	var_Items:[ItemBar,h,"",exBarData] := "this is a bit of extra data associated with task 1"
	h := var_Items:AddItem("Task 2")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010105"),"",nil)
	var_Items:[ItemBar,h,"",exBarData] := "this is a bit of extra data associated with task 2"
oDCOCX_Exontrol1:EndUpdate()

1647
How do I get arranged the levels to display, weeks, days and so on

local var_Chart as IChart
local var_Level,var_Level1 as ILevel

oDCOCX_Exontrol1:BeginUpdate()
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:UnitWidth := 24
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:[PaneWidth,false] := 0
	var_Chart:LevelCount := 2
	var_Chart:FirstWeekDay := exMonday
	var_Level := var_Chart:[Level,0]
		var_Level:Alignment := CenterAlignment
		var_Level:Label := "<b><Font Tahoma;7><%m3%>, <%yyyy%></b><b>, <Font Tahoma;7>Wk <%ww%>"
		var_Level:Unit := exWeek
		var_Level:DrawGridLines := true
	var_Level1 := var_Chart:[Level,1]
		var_Level1:Alignment := CenterAlignment
		var_Level1:Label := "<Font Tahoma;7><%d%>"
		var_Level1:Unit := exDay
	var_Chart:DrawGridLines := exAllLines
oDCOCX_Exontrol1:EndUpdate()

1646
How can I add a task and a milestone to the same item
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:Columns:Add("Task")
oDCOCX_Exontrol1:Chart:FirstVisibleDate := SToD("20010101")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Task 1")
	var_Items:AddBar(h,"Milestone",SToD("20010102"),SToD("20010102"),"MKey",nil)
	var_Items:AddBar(h,"Task",SToD("20010103"),SToD("20010107"),nil,nil)

1645
How can I change the visual appearance of the buttons on the control's overview part

local var_Chart as IChart

oDCOCX_Exontrol1:VisualAppearance:Add(1,"gBFLBCJwBAEHhEJAADhABdQFg6AADACAxRDAMgBQKAAzQFAYawdBgABoGUZ4JhUAIIRZGMIjFDcEwxC6NIpAWCYQDENQwSSMMJwSKYYBiASEYJASQZUhmHIDTbIEBxfIMIRLE6PZbmEYYfgeNY6TQCcIgVD0ExhAZ2Q4EQAKRpOFY/DBQNLgAKNCQ3LaQY7BaKgZouTYDVrVNSVFC0IBkGoSbauCIJHrGCZ1RBYMI0VDNRwHJiMbRtSyqXjGJ4pSrAcq0FAgYRHI6jZxnGL5chqPqGVjMNZ1bQuKwzT0Ld5wTYsdydBK1MIkTKKaoORZgRpYUI6FAeSgBWyPcCqPSoDrKdo4XLdYwbeAFcSPD6+NBhG7tXm/NarNTgTB6DBthsGJbgYYw9AQVxBoOch2hEbh+nAARYkQdZ7CMPYGH+FxmlqbJ5lqDAdjMC5AmIW54hwaBvA4IQ8D+T8IFscgenAAZMHiEgWiWdRZlSAAhAkFAGq6dAdEcIYVF4QJKCAHQDBCBJYGUGQNhCEIhiSCJaGAYQWBsIYmEEFgJAGQ42CyC4iliPgygsT4olSXg3g2Qwwk0MpMiMLJIg8Y54niTYOmPPJMDMDIonSSU7jMJJbDaTYjlYUoMmMCRWFQAAlEkZgtDgTgjgCJQpEoIgkgkIQHnIAB7CACARnIaIaiaGYuG6GxmhmFB7CGSICAyHwoAmQxQlQNIlikWgthYIwaAYVQvAuQpsg0IxIhKTIzCwToTiiaYACkChGhKJJpEOQoWC+C5imyCgiggYpUzMZ5Yj6AIfg6UpcjgLYInIPILhOTYaEIUg9EoItfCGCByAiCV2lIKILCGK4qnKO4YggWpQgIJxJmIaJhDgDgKECaIykkUhUhILQLEKRh9iiYpzCSSQxmgcgkm2NppAKbI8C4RoBiQYgSgSMQQEEEIDjECBDA8LorjKa47EQMQSm4DpEhEKBDBeRgBGqMQnmkA5in4JAJAINoEC6JR4jyaQ6E6AhEhIIxNBMRJPiQCYyHCGAUgUMQwEgEhhkEOBHBOBJxCMHJHjGXB/CKSBxlENwaj1qgsEwERICIDB/iQDgjgiYYvE2cx8l2KIinoEI5CYSYiFqEAz0mMBZBbwIkEsEN+gMSpSHSTITEqSoEFyGBHCoSoihqEAsgsIo8ikKhKGiVJ6AADwTkicQlAkUhElA+Z4VUHpHGuRA8lMdI9DscJc8r5QQAaIYsGUOpOjoOwHCEJAUgBh8B1EAAcHIzg5gPCGNgdQfRPhnGiLINhhQEDCBcGUDYphxjLHkNgfwTARhiHEBYWAVxpI1HQDcDjthiAADoKcCgJgbs7FyG4LQagBBgE0CMOYOxLhtGY/AcAegNgTHIPkHISAHADEQNYOA2BwAHEQHABwQxMDbCQEscoEBAAgEOD0V4cR0jyGCPAPwHAvh0EAOIHIDRfA/EaGMfYfguAACiBQIg/xWAbH0F8J4bxSD6G8MUMo7Q9ieHuI8eA0gLjfG2PUPQnwvhvHsPsGABxhD8E+AMbgfhVDJH2L8U48wAjbEGPwPo7x8j4F4FccwHAhhiEgBQEQhAnCDGgHwBonxiAZD+G8Lo/hHj3H8PELIiBwgOFCNQHAqQAhYBWAUIARAECgHyKkIIqAIgGGCLgUIFAhB5CQAcFAGgcEHHKBwUYkAdiHDgOaAIKBigYCCFAFQhBzChAWKEOYzwDhCEwFMBQNxwD3C8CsPgHQhANEuA4Uw+gdhHDAOwBogRYAzFuGAQIEgQAzCSGUAIbAXAFCiKIGghhBCQAeAFIgDgwjMByEAAYXg1hiEwFgBYAQugAGIPsTodgnDSBgMca4LhqChCgD4CIYgYBDmcI4GIxgUCYAm1oPIjwgjmFQMYWA1gNCiBUqcII6gegUEAHwB4oRwhzEGLge4GAOC6HUAcMIsAbCGDqLYHYVBACTAkIIIAYigCIGcBQCArQKiiFQFERQUQhDMAOBgcIWAggUBGIMfAVAHhCBwEgBAMg+jbFqCcHYLxvg4D2A8QI3AziMHiJoUgFhACyCwIINofwHiJDAJUKw2B2ARGEEAIwCxIh2BaNQQA/ROBRGoFYQ48B/AeEGEt99lQOgDFgGcAtFgdgHEANIMAhAIDKAygkQAEAAjxBeIoCI7QfjUEEEwDIIgWBFEQHUSANxsAqEEEUdwlA4iJCSFYEwhBsCXE0KoIAexnj4DoDkEwaBmgYCGAwMADAkCFCMMYAQOgMhQEIHsaIVQQDXFOOgRtwAUguAcAUU1iw1CWA6OwdIOQFBxCgCkDgeBribBmIgP4KQiAAB+KoAg2QNiDDoG0BQyQzg+EGOAWAFgRC4DsEURQYAdhWFKAoKAVQAB/AcHEaAORiioFqBYMWFATCZEsBsIYcA0gMGCJwGAhg4DQAwKsDAYQGzZBkAcSA8gODEBEGQVIQhajUEeeYKY1QIDrBCIAEg0xIAwEgBNkAAADUTA6B4MQEwv0UEGLAUgzhf04AKGEg4BhYD2B0MUAABApAAvqI8WAqAdDGGwJsEIXwWDtE0AAA4fhmDZCmJMMwbBkgBIC")
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:[PaneWidth,false] := 0
	var_Chart:LevelCount := 2
	var_Chart:OverviewVisible := exOverviewShowAllVisible
	var_Chart:AllowOverviewZoom := exAlwaysZoom
	var_Chart:[Label,exSecond] := ""
	var_Chart:[Label,exYear] := ""
oDCOCX_Exontrol1:Chart:OverviewSelBackColor := 0x1ffff00

1644
Is there a way to show the Start and End dates in mm-dd-yyyy format

local var_Chart as IChart
local var_Column,var_Column1 as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:Items:AllowCellValueToItemBar := true
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:LevelCount := 2
	var_Chart:FirstVisibleDate := SToD("20001225")
	var_Chart:[PaneWidth,false] := 196
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Start")}
	var_Column:[Def,exCellValueToItemBarProperty] := 1
	var_Column:[Def,exCellValueToItemBarKey] := "K1"
	var_Column:FormatColumn := "(0 array (0:=(shortdateF(value) split `/`))) + `-` + (1 array (=:0) ) + `-` + (2 array (=:0) )"
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("End")}
	var_Column1:[Def,exCellValueToItemBarProperty] := 2
	var_Column1:[Def,exCellValueToItemBarKey] := "K1"
	var_Column1:FormatColumn := "shortdateF(value) replace `/` with `-`"
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddBar(var_Items:AddItem(nil),"Task",SToD("20010101"),SToD("20010105"),"K1",nil)
	var_Items:AddBar(var_Items:AddItem(nil),"Task",SToD("20010102"),SToD("20010106"),"K1",nil)
oDCOCX_Exontrol1:EndUpdate()

1643
Is there a way to show the Start and End dates in dd-mm-yyyy format

local var_Chart as IChart
local var_Column,var_Column1 as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:MarkSearchColumn := false
oDCOCX_Exontrol1:Items:AllowCellValueToItemBar := true
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:LevelCount := 2
	var_Chart:FirstVisibleDate := SToD("20001225")
	var_Chart:[PaneWidth,false] := 196
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Start")}
	var_Column:[Def,exCellValueToItemBarProperty] := 1
	var_Column:[Def,exCellValueToItemBarKey] := "K1"
	var_Column:FormatColumn := "(1 array (0:=(shortdateF(value) split `/`))) + `-` + (0 array (=:0) ) + `-` + (2 array (=:0) )"
var_Column1 := IColumn{oDCOCX_Exontrol1:Columns:Add("End")}
	var_Column1:[Def,exCellValueToItemBarProperty] := 2
	var_Column1:[Def,exCellValueToItemBarKey] := "K1"
	var_Column1:FormatColumn := "(1 array (0:=(shortdateF(value) split `/`))) + `-` + (0 array (=:0) ) + `-` + (2 array (=:0) )"
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddBar(var_Items:AddItem(nil),"Task",SToD("20010101"),SToD("20010105"),"K1",nil)
	var_Items:AddBar(var_Items:AddItem(nil),"Task",SToD("20010102"),SToD("20010106"),"K1",nil)
oDCOCX_Exontrol1:EndUpdate()

1642
If we have bars with dark color, we use white font/color. But if the bars are too small for the caption, you can’t read it. What can we do

local var_Bar,var_Bar1,var_Bar2 as IBar
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Task")
oDCOCX_Exontrol1:Chart:FirstVisibleDate := SToD("20001229")
oDCOCX_Exontrol1:Chart:[PaneWidth,false] := 48
var_Bar := oDCOCX_Exontrol1:Chart:Bars:[Item,"Task"]
	var_Bar:Pattern := exPatternSolid
	var_Bar:Height := 17
var_Bar1 := oDCOCX_Exontrol1:Chart:Bars:[Item,"Progress"]
	var_Bar1:Pattern := exPatternSolid
	var_Bar1:Height := 17
	var_Bar1:Shape := exShapeSolid
	var_Bar1:Color := RGB(0,0,255)
var_Bar2 := oDCOCX_Exontrol1:Chart:Bars:Add("Task%Progress")
	var_Bar2:Pattern := exPatternSolid
	var_Bar2:Height := 17
	var_Bar2:Shortcut := "Percent"
oDCOCX_Exontrol1:DefaultItemHeight := 21
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Task 1")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010105"),"",nil)
	var_Items:[ItemBar,h,"",exBarColor] := 4112616
	var_Items:[ItemBar,h,"",exBarCaption] := "<fgcolor=FFFFFF><sha 0;;0>Pause"
	var_Items:AddBar(h,"Task",SToD("20010109"),SToD("20010112"),"white",nil)
	var_Items:[ItemBar,h,"white",exBarColor] := 4112616
	var_Items:[ItemBar,h,"white",exBarCaption] := "<fgcolor=FFFFFF>Pause"
	h := var_Items:AddItem("Task 2")
	var_Items:AddBar(h,"Task",SToD("20010103"),SToD("20010104"),"",nil)
	var_Items:[ItemBar,h,"",exBarColor] := 2017557
	var_Items:[ItemBar,h,"",exBarCaption] := "<fgcolor=FFFFFF><sha 0;;0>Production"
	var_Items:AddBar(h,"Task",SToD("20010110"),SToD("20010111"),"white",nil)
	var_Items:[ItemBar,h,"white",exBarColor] := 2017557
	var_Items:[ItemBar,h,"white",exBarCaption] := "<fgcolor=FFFFFF>Production"
	h := var_Items:AddItem("Task 3")
	var_Items:AddBar(h,"Percent",SToD("20010103"),SToD("20010104"),"",nil)
	var_Items:[ItemBar,h,"",exBarPercent] := 0.5
	var_Items:[ItemBar,h,"",exBarColor] := 2017557
	var_Items:[ItemBar,h,"",exBarCaption] := "<fgcolor=FFFFFF><sha 0;;0>Pausing"
	var_Items:AddBar(h,"Percent",SToD("20010110"),SToD("20010111"),"white",nil)
	var_Items:[ItemBar,h,"white",exBarPercent] := 0.5
	var_Items:[ItemBar,h,"white",exBarColor] := 2017557
	var_Items:[ItemBar,h,"white",exBarCaption] := "<fgcolor=FFFFFF>Pausing"
	h := var_Items:AddItem("Task 4")
	var_Items:AddBar(h,"Task",SToD("20010103"),SToD("20010104"),"",nil)
	var_Items:[ItemBar,h,"",exBarColor] := 8421504
	var_Items:[ItemBar,h,"",exBarCaption] := "<fgcolor=FFFFFF><sha 0;;0>Planned downtime"
	var_Items:AddBar(h,"Task",SToD("20010110"),SToD("20010111"),"white",nil)
	var_Items:[ItemBar,h,"white",exBarColor] := 8421504
	var_Items:[ItemBar,h,"white",exBarCaption] := "<fgcolor=FFFFFF>Planned downtime"
oDCOCX_Exontrol1:EndUpdate()

1641
How do I programmatically exclude items from the filter

local var_Column,var_Column1 as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Items")}
	var_Column:DisplayFilterButton := true
	var_Column:DisplayFilterPattern := false
	var_Column:FilterList := exShowExclude | exShowFocusItem | exShowCheckBox
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("Item 1")
	var_Items:AddItem("Item 2")
	var_Items:AddItem("Item 3")
	var_Items:AddItem("Item 4")
var_Column1 := oDCOCX_Exontrol1:Columns:[Item,0]
	var_Column1:FilterType := exFilterExclude | exFilter
	var_Column1:Filter := "Item 1|Item 4"
oDCOCX_Exontrol1:ApplyFilter()
oDCOCX_Exontrol1:EndUpdate()

1640
How do I show in histogram, more values for a single task

METHOD OCX_Exontrol1BeforeExpandItem(Item,Cancel) CLASS MainDialog
	// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed).
	Cancel := true
RETURN NIL

local var_Bar as IBar
local var_Chart as IChart
local var_Items as IItems
local h,hR as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SingleSel := true
oDCOCX_Exontrol1:ExpandOnDblClick := false
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:LevelCount := 2
	var_Chart:AllowLinkBars := false
	var_Chart:DrawGridLines := exAllLines
	var_Chart:FirstVisibleDate := SToD("20001229")
	var_Chart:HistogramVisible := true
	var_Chart:HistogramHeight := 167
	var_Chart:[PaneWidth,false] := 128
	var_Chart:HistogramView := exHistogramNoGrouping | exHistogramUnlockedItems
	var_Bar := var_Chart:Bars:[Item,"Task"]
		var_Bar:HistogramType := exHistCumulative
		var_Bar:HistogramItems := 6
		var_Bar:HistogramPattern := exPatternSolid
		var_Bar:HistogramItems := -40000
		var_Bar:HistogramCriticalValue := 100000
		var_Bar:HistogramRulerLinesColor := RGB(128,128,128)
		var_Bar:HistogramCumulativeColors := 3
	var_Chart:ShowNonworkingDates := false
IColumn{oDCOCX_Exontrol1:Columns:Add("Costs")}:Visible := false
IColumn{oDCOCX_Exontrol1:Columns:Add("Tasks")}:Visible := true
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Estimated")
	var_Items:[CellValue,h,1] := "Task 1"
	var_Items:AddBar(h,"Task",SToD("20010101"),SToD("20010110"),nil,nil)
	var_Items:[ItemBar,h,"",exBarEffort] := 8000
	hR := var_Items:InsertItem(h,nil,"Actual")
	var_Items:AddBar(hR,"Task",SToD("20010101"),SToD("20010110"),nil,nil)
	var_Items:[ItemBar,hR,"",exBarEffort] := 9000
	var_Items:GroupBars(h,"",true,hR,"",true,nil,nil)
	var_Items:GroupBars(h,"",false,hR,"",false,nil,nil)
	hR := var_Items:InsertItem(h,nil,"Cost")
	var_Items:AddBar(hR,"Task",SToD("20010101"),SToD("20010110"),nil,nil)
	var_Items:[ItemBar,hR,"",exBarEffort] := 200
	var_Items:GroupBars(h,"",true,hR,"",true,nil,nil)
	var_Items:GroupBars(h,"",false,hR,"",false,nil,nil)
	h := var_Items:AddItem("Estimated")
	var_Items:[CellValue,h,1] := "Task 2"
	var_Items:AddBar(h,"Task",SToD("20010109"),SToD("20010115"),nil,nil)
	var_Items:[ItemBar,h,"",exBarEffort] := 7000
	hR := var_Items:InsertItem(h,nil,"Actual")
	var_Items:AddBar(hR,"Task",SToD("20010109"),SToD("20010115"),nil,nil)
	var_Items:[ItemBar,hR,"",exBarEffort] := 8000
	var_Items:GroupBars(h,"",true,hR,"",true,nil,nil)
	var_Items:GroupBars(h,"",false,hR,"",false,nil,nil)
	hR := var_Items:InsertItem(h,nil,"Cost")
	var_Items:AddBar(hR,"Task",SToD("20010109"),SToD("20010115"),nil,nil)
	var_Items:[ItemBar,hR,"",exBarEffort] := 150
	var_Items:GroupBars(h,"",true,hR,"",true,nil,nil)
	var_Items:GroupBars(h,"",false,hR,"",false,nil,nil)
oDCOCX_Exontrol1:EndUpdate()

1639
How can I align the caption of the bar

local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Tasks")
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20001225")
	var_Chart:[PaneWidth,false] := 48
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Task")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010106"),"K","exBarHAlignCaption = 0")
	var_Items:[ItemBar,h,"K",exBarHAlignCaption] := 0
	h := var_Items:AddItem("Task")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010106"),"K","exBarHAlignCaption = 1")
	var_Items:[ItemBar,h,"K",exBarHAlignCaption] := 1
	h := var_Items:AddItem("Task")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010106"),"K","exBarHAlignCaption = 2")
	var_Items:[ItemBar,h,"K",exBarHAlignCaption] := 2
	h := var_Items:AddItem("Task")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010106"),"K","Clip 3")
	var_Items:[ItemBar,h,"K",exBarHAlignCaption] := 3
	h := var_Items:AddItem("Task")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010106"),"K","Clip 4")
	var_Items:[ItemBar,h,"K",exBarHAlignCaption] := 4
	h := var_Items:AddItem("Task")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010106"),"K","Clip 5")
	var_Items:[ItemBar,h,"K",exBarHAlignCaption] := 5
	h := var_Items:AddItem("Task")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010106"),"K","Outside Left 16")
	var_Items:[ItemBar,h,"K",exBarHAlignCaption] := 16
	h := var_Items:AddItem("Task")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010106"),"K","Outside Right 18")
	var_Items:[ItemBar,h,"K",exBarHAlignCaption] := 18
	h := var_Items:AddItem("Task")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010106"),"K","Outside Center 17")
	var_Items:[ItemBar,h,"K",exBarHAlignCaption] := 17
oDCOCX_Exontrol1:EndUpdate()

1638
How can I change the drop down filter background color

local var_Column as IColumn
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
oDCOCX_Exontrol1:[Background,exBackColorFilter] := RGB(255,255,255)
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Items")}
	var_Column:DisplayFilterButton := true
	var_Column:DisplayFilterPattern := false
	var_Column:FilterList := exShowFocusItem | exShowCheckBox | exSortItemsAsc | exLeafItems
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Root 1")
	var_Items:InsertItem(h,nil,"Child 1")
	var_Items:InsertItem(h,nil,"Child 2")
	var_Items:[ExpandItem,h] := true
	h := var_Items:AddItem("Root 2")
	var_Items:InsertItem(h,nil,"Child 1")
	var_Items:InsertItem(h,nil,"Child 2")
	var_Items:InsertItem(h,nil,"Child 3")
	var_Items:[ExpandItem,h] := true
oDCOCX_Exontrol1:EndUpdate()

1637
How can I arrange the columns using CRD (eXCRD ) strings (Sample 2)

local var_Chart as IChart
local var_Column,var_Column1,var_Column2 as IColumn
local var_Columns as IColumns
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DrawGridLines := exAllLines
oDCOCX_Exontrol1:DefaultItemHeight := 36
var_Columns := oDCOCX_Exontrol1:Columns
	var_Column := IColumn{var_Columns:Add("C1")}
		var_Column:[Def,exCellHasCheckBox] := true
		var_Column:Width := 18
		var_Column:AllowSizing := false
	var_Column1 := IColumn{var_Columns:Add("C2")}
		var_Column1:[Def,exCellHasCheckBox] := true
		var_Column1:Width := 18
	IColumn{var_Columns:Add("Column1")}:Visible := false
	IColumn{var_Columns:Add("Column2")}:Visible := false
	IColumn{var_Columns:Add("Column3")}:Visible := false
	var_Column2 := IColumn{var_Columns:Add("FormatLevel")}
		var_Column2:FormatLevel := "18;" + CHR(34) + "Info" + CHR(34) + "[a=17]/(2/3,4)"
		var_Column2:[Def,exCellFormatLevel] := "2/3,4"
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:DrawGridLines := exAllLines
	var_Chart:FirstVisibleDate := SToD("20140622")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Cell 1.1")
	var_Items:[CellValue,h,1] := "Cell 1.2"
	var_Items:[CellValue,h,2] := "Cell 1.3"
	var_Items:AddBar(h,"Task",SToD("20140623"),SToD("20140625"),nil,nil)
	h := var_Items:AddItem("Cell 2.1")
	var_Items:[CellValue,h,1] := "Cell 2.2"
	var_Items:[CellValue,h,2] := "Cell 2.3"
	var_Items:AddBar(h,"Task",SToD("20140626"),SToD("20140628"),nil,nil)
oDCOCX_Exontrol1:EndUpdate()

1636
How can I arrange the columns using CRD (eXCRD ) strings (Sample 1)

local var_Chart as IChart
local var_Column as IColumn
local var_Columns as IColumns
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DrawGridLines := exAllLines
oDCOCX_Exontrol1:DefaultItemHeight := 36
var_Columns := oDCOCX_Exontrol1:Columns
	IColumn{var_Columns:Add("Column1")}:Visible := false
	IColumn{var_Columns:Add("Column2")}:Visible := false
	IColumn{var_Columns:Add("Column3")}:Visible := false
	var_Column := IColumn{var_Columns:Add("FormatLevel")}
		var_Column:FormatLevel := "(0/1),2"
		var_Column:[Def,exCellFormatLevel] := var_Column:FormatLevel
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:DrawGridLines := exAllLines
	var_Chart:FirstVisibleDate := SToD("20140622")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Cell 1.1")
	var_Items:[CellValue,h,1] := "Cell 1.2"
	var_Items:[CellValue,h,2] := "Cell 1.3"
	var_Items:AddBar(h,"Task",SToD("20140623"),SToD("20140625"),nil,nil)
	h := var_Items:AddItem("Cell 2.1")
	var_Items:[CellValue,h,1] := "Cell 2.2"
	var_Items:[CellValue,h,2] := "Cell 2.3"
	var_Items:AddBar(h,"Task",SToD("20140626"),SToD("20140628"),nil,nil)
oDCOCX_Exontrol1:EndUpdate()

1635
How do I display the histogram for filtered items only
local var_Chart as IChart
local var_Column as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SingleSel := false
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:LevelCount := 2
	var_Chart:HistogramVisible := true
	var_Chart:HistogramHeight := 32
	var_Chart:HistogramView := exHistogramFilteredItems
	var_Chart:Bars:[Item,"Task"]:HistogramPattern := exPatternBDiagonal
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Column")}
	var_Column:DisplayFilterButton := true
	var_Column:Filter := "Item 1"
	var_Column:FilterType := exFilter
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddBar(var_Items:AddItem("Item 1"),"Task",SToD("20010102"),SToD("20010104"),nil,nil)
	var_Items:AddBar(var_Items:AddItem("Item 2"),"Task",SToD("20010103"),SToD("20010107"),nil,nil)
oDCOCX_Exontrol1:ApplyFilter()
oDCOCX_Exontrol1:EndUpdate()

1634
How can I use no scroll bars for touch-screens

METHOD OCX_Exontrol1AddItem(Item) CLASS MainDialog
	// AddItem event - Occurs after a new Item has been inserted to Items collection.
	local var_Items as IItems
	var_Items := oDCOCX_Exontrol1:Items
		var_Items:AddBar(Item,"Task",var_Items:[CellValue,Item,2],var_Items:[CellValue,Item,4],nil,nil)
RETURN NIL

METHOD OCX_Exontrol1MouseMove(Button,Shift,X,Y) CLASS MainDialog
	// MouseMove event - Occurs when the user moves the mouse.
	oDCOCX_Exontrol1:ShowToolTip("<font ;6><sha ;;0><off -4>Tip</off></sha></font> If the cursor hovers bars, click and wait for a second to start scrolling.",nil,nil,nil,nil)
RETURN NIL

local var_Chart as IChart
local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:AllowCreateBar := exNoCreateBar
	var_Chart:FirstVisibleDate := SToD("19940803")
	var_Chart:[PaneWidth,false] := 256
	var_Chart:LevelCount := 2
	var_Chart:UnitScale := exDay
	var_Chart:FirstWeekDay := exMonday
	var_Chart:OverviewVisible := exOverviewShowAllVisible
oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:ContinueColumnScroll := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:AutoDrag := exAutoDragScroll
oDCOCX_Exontrol1:ScrollWidth := 4
oDCOCX_Exontrol1:ScrollHeight := 4
oDCOCX_Exontrol1:[Background,exHSLeft] := RGB(192,192,192)
oDCOCX_Exontrol1:[Background,exHSRight] := RGB(192,192,192)
oDCOCX_Exontrol1:[Background,exHSBack] := RGB(224,224,224)
oDCOCX_Exontrol1:[Background,exHSThumb] := RGB(128,128,128)
oDCOCX_Exontrol1:[Background,exVSBack] := RGB(224,224,224)
oDCOCX_Exontrol1:[Background,exVSDown] := RGB(192,192,192)
oDCOCX_Exontrol1:[Background,exVSThumb] := RGB(128,128,128)
oDCOCX_Exontrol1:[Background,exVSUp] := RGB(192,192,192)
oDCOCX_Exontrol1:ScrollButtonWidth := 0
oDCOCX_Exontrol1:ScrollButtonHeight := 0
oDCOCX_Exontrol1:EndUpdate()

1633
How can I display values in the histogram legend

local var_Bar as IBar
local var_Chart as IChart
local var_Column as IColumn
local var_Items as IItems
local h1 as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Tasks")
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Effort")}
	var_Column:[Def,exCellValueToItemBarProperty] := 21
	var_Column:Editor:EditType := SpinType
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:LevelCount := 2
	var_Chart:NonworkingDays := 0
	var_Chart:[PaneWidth,false] := 96
	var_Chart:FirstVisibleDate := SToD("20050620")
	var_Chart:HistogramVisible := true
	var_Chart:HistogramHeight := 128
	var_Chart:HistogramView := exHistogramAllItems
	var_Bar := var_Chart:Bars:[Item,"Task"]
		var_Bar:HistogramPattern := var_Bar:Pattern
		var_Bar:HistogramType := exHistOverload
		var_Bar:HistogramCriticalValue := 3
		var_Bar:HistogramItems := -7
		var_Bar:HistogramGridLinesColor := RGB(192,192,192)
		var_Bar:HistogramRulerLinesColor := RGB(0,0,1)
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AllowCellValueToItemBar := true
	h1 := var_Items:AddItem("Task 1")
	var_Items:AddBar(h1,"Task",SToD("20050621"),SToD("20050623"),nil,nil)
	var_Items:[CellValue,h1,1] := 4
	h1 := var_Items:AddItem("Task 2")
	var_Items:AddBar(h1,"Task",SToD("20050624"),SToD("20050626"),nil,nil)
	var_Items:[CellValue,h1,1] := 3
	h1 := var_Items:AddItem("Task 3")
	var_Items:AddBar(h1,"Task",SToD("20050627"),SToD("20050629"),nil,nil)
	var_Items:[CellValue,h1,1] := 2
	h1 := var_Items:AddItem("Task 4")
	var_Items:AddBar(h1,"Task",SToD("20050630"),SToD("20050702"),nil,nil)
	var_Items:[CellValue,h1,1] := 1
oDCOCX_Exontrol1:EndUpdate()

1632
I am using AllowGroupBy property and calling the Column.SortOrder property groups by that column. Is it possible to prevent that, so I have a similar behavior like I click the column's header rather than dragging it to the control's GroupBy bar

local var_Columns as IColumns

var_Columns := oDCOCX_Exontrol1:Columns
	var_Columns:Add("First")
	var_Columns:Add("Second")
	var_Columns:Add("Third")
oDCOCX_Exontrol1:SortBarVisible := true
oDCOCX_Exontrol1:SingleSort := false
oDCOCX_Exontrol1:AllowGroupBy := true
oDCOCX_Exontrol1:Layout := "SingleSort = " + CHR(34) + "C0:1" + CHR(34) + ";MultipleSort = " + CHR(34) + "C1:2 C2:1" + CHR(34) + ""

1631
Calling programatically the Column.SortOrder property adds the column to the sort bar. Is it possible to prevent that, so I have a similar behavior like I click the column's header rather than dragging it to the control's Sort bar
local var_Columns as IColumns

var_Columns := oDCOCX_Exontrol1:Columns
	var_Columns:Add("First")
	var_Columns:Add("Second")
	var_Columns:Add("Third")
oDCOCX_Exontrol1:SortBarVisible := true
oDCOCX_Exontrol1:SingleSort := false
oDCOCX_Exontrol1:Layout := "SingleSort = " + CHR(34) + "C0:1" + CHR(34) + ""

1630
How can I specify different working parts for different items

local var_Bar as IBar
local var_Chart as IChart
local var_Column,var_Column1 as IColumn
local var_Columns as IColumns
local var_InsideZoomFormat as IInsideZoomFormat
local var_Items as IItems
local h1,h2 as USUAL

oDCOCX_Exontrol1:BeginUpdate()
var_Columns := oDCOCX_Exontrol1:Columns
	var_Columns:Add("Tasks")
	var_Column := IColumn{var_Columns:Add("Working")}
		var_Column:[Def,exCellValueToItemBarProperty] := 258
		var_Column:[Def,exCellValueToItemBarKey] := "A"
		var_Column:FormatColumn := "(0:=round(value*24)) != 0 ? =:0 : ''"
	var_Column1 := IColumn{var_Columns:Add("NonWorking")}
		var_Column1:[Def,exCellValueToItemBarProperty] := 259
		var_Column1:[Def,exCellValueToItemBarKey] := "A"
		var_Column1:FormatColumn := "(0:=round(value*24)) != 0 ? =:0 : ''"
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:[PaneWidth,false] := 78
	var_Chart:AllowCreateBar := exCreateBarAuto
	var_Chart:FirstVisibleDate := SToD("20050620")
	var_Chart:DrawLevelSeparator := exLevelNoLine
	var_Chart:LevelCount := 3
	var_Chart:[Level,1]:DrawGridLines := false
	var_Chart:AllowInsideZoom := true
	var_Chart:DrawDateTicker := true
	var_Chart:DateTickerLabel := "<%mmm%> <%d%><br><b><%hh%>:<%nn%></b>"
	var_Chart:MarkSelectDateColor := 0x7ffff8ee
	var_InsideZoomFormat := var_Chart:DefaultInsideZoomFormat
		var_InsideZoomFormat:OwnerLabel := "<%mmm%> <%d%>"
		var_InsideZoomFormat:BackColor := RGB(238,248,255)
		var_InsideZoomFormat:BackColorChart := var_InsideZoomFormat:BackColor
		var_InsideZoomFormat:InsideCount := 4
		var_InsideZoomFormat:InsideLabel := "<b><%hh%></b>"
	var_Chart:InsideZooms:Add(SToD("20050622"))
	var_Chart:DrawGridLines := exVLines
	var_Chart:Bars:[Item,"Split"]:Color := RGB(255,0,0)
	var_Bar := var_Chart:Bars:Add("Task:Split")
		var_Bar:Color := RGB(255,0,0)
		var_Bar:Pattern := exPatternBDiagonal
		var_Bar:Shortcut := "Task"
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AllowCellValueToItemBar := true
	h1 := var_Items:AddItem("Task 1")
	var_Items:AddBar(h1,"Task",SToD("20050622 08:00:00"),SToD("20050628"),"A",nil)
	var_Items:[ItemBar,h1,"A",exBarKeepWorkingCount] := true
	var_Items:[ItemNonworkingUnits,h1,false] := "weekday(value) in (1,2)"
	var_Items:[ItemNonworkingUnits,h1,true] := "weekday(value) in (1,2) or (hour(value)<8 or hour(value)>=16 )"
	h2 := var_Items:AddItem("Task 1")
	var_Items:AddBar(h2,"Task",SToD("20050622 04:00:00"),SToD("20050629 12:00:00"),"A",nil)
	var_Items:[ItemBar,h2,"A",exBarKeepWorkingCount] := true
	var_Items:[ItemNonworkingUnits,h2,false] := "weekday(value) in (1,2)"
	var_Items:[ItemNonworkingUnits,h2,true] := "weekday(value) in (1, 2) or (hour(value)<4 or hour(value)>=12 )"
oDCOCX_Exontrol1:EndUpdate()

1629
How can I define the default bar's foreground color

local var_Bar as IBar
local var_Chart as IChart
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Task")
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:[PaneWidth,false] := 48
	var_Bar := var_Chart:Bars:[Item,"Task"]
		var_Bar:Height := 15
		var_Bar:Pattern := exPatternSolid
		var_Bar:[Def,exBarForeColor] := 16777215
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddBar(var_Items:AddItem("Task 1"),"Task",SToD("20010102"),SToD("20010106"),"K1","bar A")
	var_Items:AddBar(var_Items:AddItem("Task 2"),"Task",SToD("20010102"),SToD("20010106"),"K2","bar B")
	var_Items:AddBar(var_Items:AddItem("Task 3"),"Task",SToD("20010102"),SToD("20010106"),"K3","bar C")
oDCOCX_Exontrol1:EndUpdate()

1628
How can I print the selected items only

METHOD OCX_Exontrol1AddItem(Item) CLASS MainDialog
	// AddItem event - Occurs after a new Item has been inserted to Items collection.
	local var_Items as IItems
	var_Items := oDCOCX_Exontrol1:Items
		var_Items:AddBar(Item,"Task",var_Items:[CellValue,Item,2],var_Items:[CellValue,Item,4],nil,nil)
RETURN NIL

local var_Print as IExPrint
local var_Items as IItems
local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SingleSel := false
oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:ContinueColumnScroll := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:Chart:FirstVisibleDate := SToD("19940804")
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[SelectItem,var_Items:[ItemByIndex,0]] := true
	var_Items:[SelectItem,var_Items:[ItemByIndex,2]] := true
	var_Items:[SelectItem,var_Items:[ItemByIndex,4]] := true
oDCOCX_Exontrol1:EndUpdate()
// Generate Source for 'ExPrint 1.0 Control Library(ExPrint.dll)' server from Tools\Automation Server...
var_Print := IExPrint{"Exontrol.Print"}
	var_Print:Options := "Print = Selection"
	var_Print:PrintExt := oDCOCX_Exontrol1
	var_Print:Preview()

1627
How can I sort the columns to be displayed on the columns floating bar
local var_Columns as IColumns

oDCOCX_Exontrol1:ColumnAutoResize := false
var_Columns := oDCOCX_Exontrol1:Columns
	IColumn{var_Columns:Add("City")}:Visible := false
	IColumn{var_Columns:Add("Start")}:Visible := false
	IColumn{var_Columns:Add("End")}:Visible := false
oDCOCX_Exontrol1:ColumnsFloatBarVisible := exColumnsFloatBarVisibleIncludeHiddenColumns
oDCOCX_Exontrol1:ColumnsFloatBarSortOrder := SortAscending

1626
How can I add a vertical padding for my cells
local var_Column as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DrawGridLines := exAllLines
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Padding")}
	var_Column:[Def,exCellHasCheckBox] := true
	var_Column:[Def,exCellSingleLine] := false
	var_Column:[Def,exCellPaddingLeft] := 6
	var_Column:[Def,exCellPaddingRight] := 6
	var_Column:[Def,exCellPaddingTop] := 6
	var_Column:[Def,exCellPaddingBottom] := 6
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("padding")
	var_Items:AddItem("padding")
oDCOCX_Exontrol1:EndUpdate()

1625
Trying to fill the second columns. How can I do that
local var_Columns as IColumns
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
var_Columns := oDCOCX_Exontrol1:Columns
	var_Columns:Add("Column 1")
	var_Columns:Add("Column 2")
	var_Columns:Add("Column 3")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("SubItem 1.1")
	var_Items:[CellValue,h,1] := "SubItem 1.2"
	var_Items:[CellValue,h,2] := "SubItem 1.3"
	h := var_Items:AddItem("SubItem 2.1")
	var_Items:[CellValue,h,1] := "SubItem 2.2"
	var_Items:[CellValue,h,2] := "SubItem 2.3"
oDCOCX_Exontrol1:EndUpdate()

1624
How can I specify a different background color for item, in chart or list panels

local var_Items as IItems
local h,hC as USUAL

oDCOCX_Exontrol1:Columns:Add("Default")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Root")
	hC := var_Items:InsertItem(h,nil,"Child 1")
	var_Items:[ItemBackColor,hC] := RGB(255,0,0)
	oDCOCX_Exontrol1:Chart:[ItemBackColor,hC] := RGB(0,255,0)
	var_Items:InsertItem(h,nil,"Child 2")
	var_Items:[ExpandItem,h] := true

1623
Is it possible to specify a status part for each bar

local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Task")
oDCOCX_Exontrol1:Chart:FirstVisibleDate := SToD("20010101")
oDCOCX_Exontrol1:Chart:[PaneWidth,false] := 64
oDCOCX_Exontrol1:Debug := true
oDCOCX_Exontrol1:VisualAppearance:Add(1,"gBFLBCJwBAEHhEJAAChABL8IQAAYAQGKIaBwAKBQAGaAoDDQNgyQwAAxwdBMKgBBCLIxhEYobgmGIaRjHcQjEKoSxHEqIRpGCRoJiqLIZAJIEZRZAcaQvGSQYRASCRNDEOA0TDAY4jPD4aQiGIbRjjeL5YjiNo2UxTNRQCEB")
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Task 1")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010104"),"A",nil)
	var_Items:AddBar(h,"Task",SToD("20010105"),SToD("20010107"),"B1",nil)
	var_Items:AddBar(h,"Task",SToD("20010108"),SToD("20010117"),"B2",nil)
	var_Items:AddBar(var_Items:AddItem("Task 2"),"Task",SToD("20010102"),SToD("20010104"),"K3",nil)
	var_Items:AddBar(var_Items:AddItem("Task 4"),"Task",SToD("20010102"),SToD("20010104"),"K4",nil)
	var_Items:[ItemBar,0,"<*>",exBarColor] := 255
	var_Items:[ItemBar,0,"<*>",exBarFrameColor] := 16777216
oDCOCX_Exontrol1:EndUpdate()

1622
How can I change the the focus rectangle

local var_Column as IColumn
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:VisualAppearance:Add(1,"C:\Program Files\Exontrol\ExG2antt\sample\EBN\hoverinsert.ebn")
oDCOCX_Exontrol1:[Background,exShowFocusRect] := 0x1000000
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Check")}
	var_Column:[Def,exCellPaddingLeft] := 2
	var_Column:[Def,exCellHasCheckBox] := true
oDCOCX_Exontrol1:SelForeColor := oDCOCX_Exontrol1:ForeColor
oDCOCX_Exontrol1:SelBackColor := oDCOCX_Exontrol1:BackColor
oDCOCX_Exontrol1:DefaultItemHeight := 22
oDCOCX_Exontrol1:ShowFocusRect := true
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("")
	var_Items:AddItem("")
oDCOCX_Exontrol1:EndUpdate()

1621
Can each cell have their own dropdown lists that contain "different list item values" for each cell, not predefined for the entire column
local var_Editor,var_Editor1,var_Editor2,var_Editor3 as IEditor
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("Column/Cell-Same")}:Editor
	var_Editor:EditType := DropDownListType
	var_Editor:AddItem(0,"Zero",nil)
	var_Editor:AddItem(1,"One",nil)
	var_Editor:AddItem(2,"Two",nil)
var_Editor1 := IColumn{oDCOCX_Exontrol1:Columns:Add("Column/Cell-Different")}:Editor
	var_Editor1:EditType := EditType
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem(nil)
	h := var_Items:AddItem(0)
	var_Editor2 := var_Items:[CellEditor,h,1]
		var_Editor2:EditType := DropDownListType
		var_Editor2:AddItem(3,"Three",nil)
		var_Editor2:AddItem(4,"Four",nil)
	var_Items:[CellValue,h,1] := 3
	var_Items:AddItem(nil)
	h := var_Items:AddItem(0)
	var_Editor3 := var_Items:[CellEditor,h,1]
		var_Editor3:EditType := CheckListType
		var_Editor3:AddItem(1,"Single",nil)
		var_Editor3:AddItem(2,"Double",nil)
	var_Items:[CellValue,h,1] := 3
oDCOCX_Exontrol1:EndUpdate()

1620
How can I specify just a few fonts in a FontType editor
local var_Editor as IEditor
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:DefaultItemHeight := 22
oDCOCX_Exontrol1:DrawGridLines := exRowLines
var_Editor := IColumn{oDCOCX_Exontrol1:Columns:Add("Fonts")}:Editor
	var_Editor:EditType := FontType
	var_Editor:ClearItems()
	var_Editor:AddItem(0,"Calibri",nil)
	var_Editor:AddItem(1,"Arial",nil)
	var_Editor:AddItem(2,"Rockwell",nil)
	var_Editor:AddItem(3,"Tahoma",nil)
	var_Editor:SortItems(true,nil)
	var_Editor:DropDownRows := 4
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("Tahoma")
oDCOCX_Exontrol1:EndUpdate()

1619
How can I show only the working-hours in chart and histogram panels

local var_Bar as IBar
local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Tasks")
oDCOCX_Exontrol1:DrawGridLines := exAllLines
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:[PaneWidth,false] := 40
	var_Chart:FirstVisibleDate := SToD("20050620")
	var_Chart:HistogramVisible := true
	var_Chart:HistogramHeight := 64
	var_Chart:HistogramView := exHistogramAllItems
	var_Chart:LevelCount := 3
	var_Chart:NonworkingHours := 16253183
	var_Bar := var_Chart:Bars:[Item,"Task"]
		var_Bar:HistogramType := exHistOverAllocation
		var_Bar:HistogramPattern := var_Bar:Pattern
	var_Chart:ShowNonworkingDates := false
	var_Chart:ShowNonworkingUnits := false
	var_Chart:ShowNonworkingHours := false
	var_Chart:DrawGridLines := exAllLines
	var_Chart:UnitScale := exHour
	var_Chart:UnitWidth := 4
	var_Chart:ResizeUnitScale := var_Chart:UnitScale
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Task A")
	var_Items:AddBar(h,"Task",SToD("20050623 11:00:00"),SToD("20050623 12:00:00"),nil,nil)
	var_Items:[ItemBar,h,"",exBarEffort] := "0.0416666"
	var_Items:[ItemBar,h,"",exBarKeepWorkingCount] := true
	h := var_Items:AddItem("Task B")
	var_Items:AddBar(h,"Task",SToD("20050623 12:00:00"),SToD("20050623 16:00:00"),nil,nil)
	var_Items:[ItemBar,h,"",exBarEffort] := "0.0416666"
	var_Items:[ItemBar,h,"",exBarKeepWorkingCount] := true
oDCOCX_Exontrol1:EndUpdate()

1618
How do you embed HTML options into the anchor click string
METHOD OCX_Exontrol1AnchorClick(AnchorID,Options) CLASS MainDialog
	// AnchorClick event - Occurs when an anchor element is clicked.
	OutputDebugString(String2Psz( AsString(AnchorID) ))
	OutputDebugString(String2Psz( AsString(Options) ))
RETURN NIL

local var_Columns as IColumns
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
var_Columns := oDCOCX_Exontrol1:Columns
	IColumn{var_Columns:Add("Car")}:[Def,exCellValueFormat] := 1
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem("<a mazda_1;options for 1>Mazda <b>1</b></a>")
	var_Items:AddItem("<a mazda_2;options for 2>Mazda <b>2</b></a>")
	var_Items:AddItem("<a mazda_3;options for 3a>Mazda <b>3.a</b></a>")
	var_Items:AddItem("<a mazda_3;options for 3b>Mazda <b>3.b</b></a>")
oDCOCX_Exontrol1:EndUpdate()

1617
How do I add a checkbox column (method 2)

METHOD OCX_Exontrol1CellStateChanged(Item,ColIndex) CLASS MainDialog
	// CellStateChanged event - Fired after cell's state has been changed.
	OutputDebugString(String2Psz( "CheckBox Changed:" ))
	OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:Items:[CellState,Item,ColIndex]) ))
RETURN NIL

local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
IColumn{oDCOCX_Exontrol1:Columns:Add("Check")}:[Def,exCellHasCheckBox] := true
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[CellState,var_Items:AddItem("Check 1"),0] := 0
	var_Items:[CellState,var_Items:AddItem("Check 2"),0] := 1
	var_Items:[CellState,var_Items:AddItem("Check 3"),0] := 0
	var_Items:[CellState,var_Items:AddItem("Check 4"),0] := 1
oDCOCX_Exontrol1:EndUpdate()

1616
How do I add a checkbox column (method 1)

METHOD OCX_Exontrol1Change(Item,ColIndex,NewValue) CLASS MainDialog
	// Change event - Occurs when the user changes the cell's content.
	OutputDebugString(String2Psz( "CheckBox Changed:" ))
	OutputDebugString(String2Psz( AsString(NewValue) ))
RETURN NIL

local var_Column as IColumn
local var_Editor as IEditor
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
var_Column := IColumn{oDCOCX_Exontrol1:Columns:Add("Check")}
	var_Editor := var_Column:Editor
		var_Editor:EditType := CheckValueType
		var_Editor:[Option,exCheckValue2] := 1
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddItem(0)
	var_Items:AddItem(1)
	var_Items:AddItem(0)
	var_Items:AddItem(1)
oDCOCX_Exontrol1:EndUpdate()

1615
How do I change the progress bar's appearance

local var_Appearance as IAppearance
local var_Editor as IEditor

var_Appearance := oDCOCX_Exontrol1:VisualAppearance
	var_Appearance:Add(1,"c:\exontrol\images\normal.ebn")
	var_Appearance:Add(2,"c:\exontrol\images\pushed.ebn")
var_Editor := oDCOCX_Exontrol1:ColumnsIColumn{:Add("Progress")}:Editor
	var_Editor:EditType := ProgressBarType
	var_Editor:[Option,exProgressBarBackColor] := 16777216
	var_Editor:[Option,exProgressBarMarkTicker] := 33554432
oDCOCX_Exontrol1:Items:AddItem(33)

1614
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 3)

local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:VisualAppearance:Add(1,"gBFLBCJwBAEHhEJAEGg4BVEIQAAYAQGKIYBkAKBQAGaAoDDMOQwQwAAxjGKEEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQCWIAzATGYBRfIUEgjBM6ExwG78egBHp/ZpkACIJJAaRjHQdJxGKKMQB9DIhCZpeKhWgkKIJBzOEyBRC4ERBGqNGrsIgLEqWZpnWhaNpWXYTLyBN64LhuK46g53O6wLxvK6hEr2dJ/YBcIAOfghf4NQ7EMRxLC8Mw3BDvYDkOAABAIgI=")
oDCOCX_Exontrol1:SelBackColor := 0x1fffffe
oDCOCX_Exontrol1:SelForeColor := RGB(0,0,0)
oDCOCX_Exontrol1:SelBackColor := 0x1000000
oDCOCX_Exontrol1:ShowFocusRect := false
oDCOCX_Exontrol1:Columns:Add("Items")
oDCOCX_Exontrol1:DefaultItemHeight := 22
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[ItemBackColor,var_Items:AddItem("red")] := RGB(255,0,0)
	var_Items:[ItemBackColor,var_Items:AddItem("blue")] := RGB(0,0,255)
	var_Items:[ItemBackColor,var_Items:AddItem("green")] := RGB(0,255,0)
oDCOCX_Exontrol1:EndUpdate()

1613
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 2)

local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SelBackMode := exTransparent
oDCOCX_Exontrol1:DefaultItemHeight := 22
oDCOCX_Exontrol1:ShowFocusRect := false
oDCOCX_Exontrol1:Columns:Add("Items")
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[ItemBackColor,var_Items:AddItem("red")] := RGB(255,0,0)
	var_Items:[ItemBackColor,var_Items:AddItem("blue")] := RGB(0,0,255)
	var_Items:[ItemBackColor,var_Items:AddItem("green")] := RGB(0,255,0)
oDCOCX_Exontrol1:EndUpdate()

1612
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 1)

local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:SelBackColor := oDCOCX_Exontrol1:BackColor
oDCOCX_Exontrol1:SelForeColor := oDCOCX_Exontrol1:ForeColor
oDCOCX_Exontrol1:DefaultItemHeight := 22
oDCOCX_Exontrol1:ShowFocusRect := true
oDCOCX_Exontrol1:Columns:Add("Items")
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[ItemBackColor,var_Items:AddItem("red")] := RGB(255,0,0)
	var_Items:[ItemBackColor,var_Items:AddItem("blue")] := RGB(0,0,255)
	var_Items:[ItemBackColor,var_Items:AddItem("green")] := RGB(0,255,0)
oDCOCX_Exontrol1:EndUpdate()

1611
The BeforeExpandItem event is fired when clicking the drop down filter button. What we can do to prevent that

METHOD OCX_Exontrol1BeforeExpandItem(Item,Cancel) CLASS MainDialog
	// BeforeExpandItem event - Fired before an item is about to be expanded (collapsed).
	OutputDebugString(String2Psz( "BeforeExpandItem" ))
	OutputDebugString(String2Psz( AsString(Item) ))
	oDCOCX_Exontrol1:Items:InsertItem(Item,nil,"new child")
RETURN NIL

local var_Column as IColumn
local var_Columns as IColumns
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:LinesAtRoot := exLinesAtRoot
var_Columns := oDCOCX_Exontrol1:Columns
	var_Column := IColumn{var_Columns:Add("Items")}
		var_Column:DisplayFilterButton := true
		var_Column:FilterList := exRootItems
var_Items := oDCOCX_Exontrol1:Items
	var_Items:[ItemHasChildren,var_Items:InsertItem(nil,nil,"Group 1")] := true
	var_Items:[ItemHasChildren,var_Items:InsertItem(nil,nil,"Group 2")] := true
oDCOCX_Exontrol1:EndUpdate()

1610
How can identify when I clicked Hour, Month, or Year of the time-scale overview

METHOD OCX_Exontrol1OverviewZoom() CLASS MainDialog
	// OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area.
	OutputDebugString(String2Psz( "UnitScale: " ))
	OutputDebugString(String2Psz( AsString(oDCOCX_Exontrol1:Chart:UnitScale) ))
RETURN NIL

local var_Chart as IChart

var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:[PaneWidth,false] := 128
	var_Chart:LevelCount := 2
	var_Chart:OverviewVisible := exOverviewShowAllVisible
	var_Chart:AllowOverviewZoom := exAlwaysZoom

1609
How can define a minimum and maximum in a column SpinType
local var_Columns as IColumns
local var_Editor as IEditor

var_Columns := oDCOCX_Exontrol1:Columns
	var_Editor := IColumn{var_Columns:Add("SpinType between 5 and 150")}:Editor
		var_Editor:EditType := SliderType
		var_Editor:Numeric := exInteger
		var_Editor:[Option,exSliderWidth] := 0
		var_Editor:[Option,exSliderMin] := 5
		var_Editor:[Option,exSliderMax] := 150
oDCOCX_Exontrol1:Items:AddItem(50)

1608
How I can change the title of the time-scale overview. (Example: Month by 'Mes', Day by 'Dia')

local var_Chart as IChart

var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:[PaneWidth,false] := 128
	var_Chart:LevelCount := 2
	var_Chart:OverviewVisible := exOverviewShowAllVisible
	var_Chart:AllowOverviewZoom := exAlwaysZoom
	var_Chart:OverviewZoomCaption := "Aņo|||Mes|||Dia|||"
	var_Chart:[Label,exHalfYear] := ""
	var_Chart:[Label,exQuarterYear] := ""
	var_Chart:[Label,exThirdMonth] := ""
	var_Chart:[Label,exWeek] := ""
	var_Chart:[Label,exHour] := ""
	var_Chart:[Label,exMinute] := ""
	var_Chart:[Label,exSecond] := ""

1607
Is it possible to set a fixed wide for the Items List Arrea, so that when changing the Form.width, the Items List Arrea be constant and therefor changing the Chart Area-wide

oDCOCX_Exontrol1:OnResizeControl := exResizeChart

1606
How can I clear the colors for all bars at once
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Task")
oDCOCX_Exontrol1:Chart:FirstVisibleDate := SToD("20010101")
oDCOCX_Exontrol1:Chart:[PaneWidth,false] := 64
oDCOCX_Exontrol1:Debug := true
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Task 1")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010104"),"A",nil)
	var_Items:[ItemBar,h,"A",exBarColor] := 65280
	var_Items:AddBar(h,"Task",SToD("20010105"),SToD("20010107"),"B1",nil)
	var_Items:AddBar(h,"Task",SToD("20010108"),SToD("20010117"),"B2",nil)
	var_Items:AddBar(var_Items:AddItem("Task 2"),"Task",SToD("20010102"),SToD("20010104"),"K3",nil)
	var_Items:AddBar(var_Items:AddItem("Task 4"),"Task",SToD("20010102"),SToD("20010104"),"K4",nil)
	var_Items:[ItemBar,0,"<*>",exBarColor] := 0
oDCOCX_Exontrol1:EndUpdate()

1605
How can I change the colors for all bars at once
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:Columns:Add("Task")
oDCOCX_Exontrol1:Chart:FirstVisibleDate := SToD("20010101")
oDCOCX_Exontrol1:Chart:[PaneWidth,false] := 64
oDCOCX_Exontrol1:Debug := true
var_Items := oDCOCX_Exontrol1:Items
	h := var_Items:AddItem("Task 1")
	var_Items:AddBar(h,"Task",SToD("20010102"),SToD("20010104"),"A",nil)
	var_Items:AddBar(h,"Task",SToD("20010105"),SToD("20010107"),"B1",nil)
	var_Items:AddBar(h,"Task",SToD("20010108"),SToD("20010117"),"B2",nil)
	var_Items:AddBar(var_Items:AddItem("Task 2"),"Task",SToD("20010102"),SToD("20010104"),"K3",nil)
	var_Items:AddBar(var_Items:AddItem("Task 4"),"Task",SToD("20010102"),SToD("20010104"),"K4",nil)
	var_Items:[ItemBar,0,"<*>",exBarColor] := 255
oDCOCX_Exontrol1:EndUpdate()

1604
How can I show my custom bars in the histogram (method 3)

local var_Bar as IBar
local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:LevelCount := 2
	var_Chart:AllowLinkBars := false
	var_Chart:DrawGridLines := exAllLines
	var_Chart:FirstVisibleDate := SToD("20001231")
	var_Chart:HistogramVisible := true
	var_Chart:HistogramHeight := 64
	var_Chart:[PaneWidth,false] := 128
	var_Bar := var_Chart:Bars:[Item,"Task"]
		var_Bar:HistogramType := exHistCumulative
		var_Bar:HistogramItems := 6
		var_Bar:HistogramPattern := var_Bar:Pattern
		var_Bar:HistogramCumulativeOriginalColorBars := exKeepOriginalColor
		var_Bar:OverlaidType := exOverlaidBarsOffset
oDCOCX_Exontrol1:Columns:Add("Column")
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddBar(var_Items:AddItem("Item 1"),"Task",SToD("20010102"),SToD("20010104"),nil,nil)
	var_Items:AddBar(var_Items:AddItem("Item 2"),"Task",SToD("20010103"),SToD("20010107"),nil,nil)
	h := var_Items:AddItem("Item 3")
	var_Items:AddBar(h,"Task",SToD("20010108"),SToD("20010112"),nil,nil)
	var_Items:[ItemBar,h,"",exBarColor] := 255
oDCOCX_Exontrol1:EndUpdate()

1603
How can I show my custom bars in the histogram (method 2)

local var_Chart as IChart
local var_Items as IItems
local h as USUAL

oDCOCX_Exontrol1:BeginUpdate()
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:[PaneWidth,false] := 64
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:HistogramVisible := true
	var_Chart:HistogramHeight := 32
	var_Chart:Bars:[Item,"Task"]:HistogramPattern := exPatternBDiagonal
oDCOCX_Exontrol1:Columns:Add("Column")
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddBar(var_Items:AddItem("Item 1"),"Task",SToD("20010102"),SToD("20010104"),nil,nil)
	var_Items:AddBar(var_Items:AddItem("Item 2"),"Task",SToD("20010103"),SToD("20010107"),nil,nil)
	h := var_Items:AddItem("Item 3")
	var_Items:AddBar(h,"Task",SToD("20010108"),SToD("20010112"),nil,nil)
	var_Items:[ItemBar,h,"",exBarColor] := 255
oDCOCX_Exontrol1:EndUpdate()

1602
How can I show my custom bars in the histogram (method 1)
local var_Bar as IBar
local var_Chart as IChart
local var_Items as IItems

oDCOCX_Exontrol1:BeginUpdate()
var_Chart := oDCOCX_Exontrol1:Chart
	var_Chart:[PaneWidth,false] := 64
	var_Chart:FirstVisibleDate := SToD("20010101")
	var_Chart:HistogramVisible := true
	var_Chart:HistogramHeight := 32
	var_Chart:Bars:[Item,"Task"]:HistogramPattern := exPatternBDiagonal
	var_Bar := var_Chart:Bars:Copy("Task","MyBar")
		var_Bar:HistogramPattern := exPatternFDiagonal
		var_Bar:Color := RGB(255,0,0)
		var_Bar:HistogramColor := var_Bar:Color
oDCOCX_Exontrol1:Columns:Add("Column")
var_Items := oDCOCX_Exontrol1:Items
	var_Items:AddBar(var_Items:AddItem("Item 1"),"Task",SToD("20010102"),SToD("20010104"),nil,nil)
	var_Items:AddBar(var_Items:AddItem("Item 2"),"Task",SToD("20010103"),SToD("20010107"),nil,nil)
	var_Items:AddBar(var_Items:AddItem("Item 3"),"MyBar",SToD("20010108"),SToD("20010112"),nil,nil)
oDCOCX_Exontrol1:EndUpdate()

1601
Do you have any Fit-To-Page options when printing the control

METHOD OCX_Exontrol1AddItem(Item) CLASS MainDialog
	// AddItem event - Occurs after a new Item has been inserted to Items collection.
	local var_Items as IItems
	var_Items := oDCOCX_Exontrol1:Items
		var_Items:AddBar(Item,"Task",var_Items:[CellValue,Item,2],var_Items:[CellValue,Item,4],nil,nil)
RETURN NIL

local var_Print as IExPrint
local rs as _Recordset

oDCOCX_Exontrol1:BeginUpdate()
oDCOCX_Exontrol1:ColumnAutoResize := false
oDCOCX_Exontrol1:ContinueColumnScroll := false
// Generate Source for 'Microsoft ActiveX Data Objects 6.1 Library(msado15.dll)' server from Tools\Automation Server...
rs := _Recordset{"ADOR.Recordset"}
	rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.accdb",3,3,0)
oDCOCX_Exontrol1:DataSource := _Recordset{rs}
oDCOCX_Exontrol1:Chart:FirstVisibleDate := SToD("19940804")
oDCOCX_Exontrol1:EndUpdate()
// Generate Source for 'ExPrint 1.0 Control Library(ExPrint.dll)' server from Tools\Automation Server...
var_Print := IExPrint{"Exontrol.Print"}
	var_Print:Options := "FitToPage = On"
	var_Print:PrintExt := oDCOCX_Exontrol1
	var_Print:Preview()